Skip to content

hariuc/work_with_date_and_time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

work_with_date_and_time

A Dart library for working with DateTime

Using the library

  1. Adding the following lines to the pabspec.yaml file:
dependencies:
  work_with_date_and_time:
    git:
      url: https://github.com/hariuc/work_with_date_and_time.git
  1. Run dart pub get or flutter pub get

  2. Importing the package into your dart code:

import 'package:work_with_date_and_time/work_with_date_and_time.dart';
  1. Using the WorkWithDateAndTime class:
//Example 1
var isLeapYear = WorkWithDateAndTime.isLeapYear(dateTime: DateTime(2021));
print(isLeapYear);
// => false
//Example 2
var beginOfQuarter = WorkWithDateAndTime.beginOfQuarter(dateTime: DateTime(2021, 3));
print(beginOfQuarter);
// => 2021-01-01 00:00:00.000

About

A Dart library for working with date and time.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages