date_time_plus

Creator: coderz1093

Last updated:

0 purchases

date_time_plus Image
date_time_plus Images
Add to Cart

Description:

date time plus

date_time_plus #
Pick Date or Time functions, Date or Time convert functions.
Using #
For help getting started with Flutter, view our
online documentation, which offers tutorials,
samples, guidance on mobile and web development, and a full API reference.
Installation #
First, add date_time_plus as a dependency in your pubspec.yaml file.
In your flutter project add the dependency:
dependencies:
...
date_time_plus:
copied to clipboard
For help getting started with Flutter, view the online
documentation.
Example #
Please follow this example here.
Date Picker and Time Picker #

Use DateTimes.datePicker or DateTimes.timePicker function


Date Time

DateTimes.getCurrentDateTime()
DateTimes.getCurrentDate()
DateTimes.getCurrentTime()
copied to clipboard

Date Picker

DateTimes.datePicker(
context: context,
date: "1997-04-26",
onSelected: (date) {
log(date);
})
copied to clipboard

Date Range Picker

DateTimes.dateRangePicker(
context: context,
fromDate: "1997-04-26",
toDate: "1997-04-30",
onSelected: (fromDate, toDate) {
log("$fromDate / $toDate");
})
copied to clipboard

Time Picker

DateTimes.timePicker(
context: context,
time: "12:12:00",
onSelected: (time) {
log(time);
})
copied to clipboard

Calculate days, hours, minutes, seconds by date

DateTimes.calcValueByDateTime(fromDateTime: "1997-04-26 12:12:00", toDateTime: "1997-04-30 12:12:00").inDays
DateTimes.calcValueByDateTime(fromDateTime: "1997-04-26 12:12:00", toDateTime: "1997-04-30 12:12:00").inHours
DateTimes.calcValueByDateTime(fromDateTime: "1997-04-26 12:12:00", toDateTime: "1997-04-30 12:12:00").inMinutes
DateTimes.calcValueByDateTime(fromDateTime: "1997-04-26 12:12:00", toDateTime: "1997-04-30 12:12:00").inSeconds

DateTimes.calcValueByDateTime(fromDateTime: "1997-04-26 12:12:00", toDateTime: "1997-04-30 12:12:00").days
DateTimes.calcValueByDateTime(fromDateTime: "1997-04-26 12:12:00", toDateTime: "1997-04-30 12:12:00").hours
DateTimes.calcValueByDateTime(fromDateTime: "1997-04-26 12:12:00", toDateTime: "1997-04-30 12:12:00").minutes
DateTimes.calcValueByDateTime(fromDateTime: "1997-04-26 12:12:00", toDateTime: "1997-04-30 12:12:00").seconds
copied to clipboard

Start & End Date by date of month

DateTimes.startAndEndDateOfMonth(date: "1997-04-26").startDate
DateTimes.startAndEndDateOfMonth(date: "1997-04-26").endDate
copied to clipboard

Convert total seconds to time value (days, hours, minutes, seconds) (timer)

DateTimes.timer(seconds: 1200).inDays
DateTimes.timer(seconds: 1200).inHours
DateTimes.timer(seconds: 1200).inMinutes
DateTimes.timer(seconds: 1200).inSeconds
copied to clipboard

Convert time to time value (days, hours, minutes, seconds)

DateTimes.timeToValue(time: "12:12:12").inDays
DateTimes.timeToValue(time: "12:12:12").inHours
DateTimes.timeToValue(time: "12:12:12").inMinutes
DateTimes.timeToValue(time: "12:12:12").inSeconds
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.