date_operations/date_formation
library
Functions
-
calculateDaysBetweenTwoDates(DateTime startDate, DateTime endDate)
→ int
-
Calculates the number of days between two
DateTime
objects.
-
calculateTimeDelayInMinutes({required DateTime start, required DateTime end})
→ String
-
-
convert24To12(String time)
→ String
-
-
convertTimeTo24Hour(String time)
→ List<int>
-
-
convertToDateTime(String time)
→ DateTime
-
-
getDateByName(DateTime date)
→ ({String day, String month, String year})
-
Extracts the year, month, and day from a
DateTime
object and returns them as a named tuple.
-
stringToDate(String date, {String format = 'yyyy-MM-dd'})
→ DateTime
-
Converts a string representation of a date to a
DateTime
object.
-
stringToDateByName(String date, {String format = 'yyyy-MM-dd'})
→ ({String day, String month, String year})
-
Converts a string representation of a date to a named tuple containing the year, month, and day.