moment_dart 0.9.0+1
moment_dart: ^0.9.0+1 copied to clipboard
Immutable DateTime subclass for easier interaction with DateTime objects. Supports multiple localizations to convert DateTime into human-readable format
0.9.0+1 #
- Added en_US in MomentLocalizations.locales
0.9.0 #
- Added demo. Check it out
- Localization
- Renamed all localization files to their corresponding localization ID
- Renamed all localization classes to their corresponding localization ID
- Added static method
MomentLocalizations.byLanguage()andMomentLocalizations.byLocale()
- Fixed Italian localization data
0.8.2+1 #
- Updated README.md
0.8.2 #
- Added static method
Moment.tryParse()
0.8.1 #
- Added
.differenceInDays(other)function DurationExtraextension onDuration- Added new locale: Italian (it) (Italy)
- Refactored relative times in Indo-European languages, and bunch of other stuff
0.8.0 #
MomentLocalizationhas gotten major updates, making it easier to implmement new localizations:- No longer requires to override
.calendar(...) - Requires to override these new functions/getters:
calendarData,weekdayName,overrideFormatters - Restructured formatters. No need to override formatter for every
FormatterToken
- No longer requires to override
- Removed following deprecated methods:
Moment.lastMondayAsDateTime(),Moment.lastSundayAsDateTime() - Implemented
.endOf(DurationUnit unit), and it's children.endOf~~~(). Works on bothMomentandDateTime - Added new locales:
- Spanish (es) (Spain)
- French (fr) (France)
- Minor changes:
- No longer produces debug stdouts, deprecating
enableDebugPrint()
- No longer produces debug stdouts, deprecating
0.7.3 #
- Added shorthand function for commonly used tokens. e.g., moment.LT, moment.LTS, moment.L, etc.
0.7.2 #
- Updated
README.md
0.7.1 #
Moment.format()no longer has required positional argument. Optional positional argument defaults tol;
0.7.0 #
- IMPORTANT CHANGE: Now
MomentextendsDateTimeclass - IMPORTANT CHANGE: Now targets Dart version 2.17.0 and above
- Implemented 6 operators (+, -, <, <=, >=, >) for
DateTimeandMoment. Part of MomentBenefits extension - Implemented
.lastWeekday(int weekday), and it's children.lastMonday(),.lastTuesday(), ...,.lastSunday(). You can also do same thing to find future weekdays. e.g.,.nextMonday(). Works on bothMomentandDateTime - Implemented
.startOf(DurationUnit unit), and it's children.startOf~~~(). Works on bothMomentandDateTime
0.6.2 #
- Now Mongolian singular units include number
1as nature of the language is not similar to English. e.g.,минутын өмнө=>1 минутын өмнө - Mongolian script with Mongolian numbers (
mn_TM_tn)'s.relative(-)now uses Mongolian numbers
0.6.1 #
- Fixed Mongolian
mn_MNand Mongolian Scriptmn_TMsuffixes
0.6.0+2 #
- Updated README.md
0.6.0+1 #
- Updated README.md
0.6.0 #
- Added comparison functions (
isAtSame_As(other)) - Removed unwanted console logs
- Updated README.md
0.5.0 #
- Now it's possible to escape strings in
Moment.format(). Encapsulate the text in square brackets ([]) to do so. - Fixed calendar relative week miscalculations
- Changed localization default date format from
Ltol(shortened version)
0.4.2 #
- Fixed number word gender-dependent suffix in Mongolian languages. (
mn_MN,mn_MNtraditional mongolian)
0.4.1 #
- Made major fixes in
de_DElocalization - Implemented all
DateTimefunctions inMomentclass - Implemented
MomentBenefitsextension functions inMomentclass
0.4.0 #
- Exposed localizations' classes
- Fixed Yesterday/Tomorrow calculation. It was horrible :(((
- Other major fixes in localizations
0.3.0 #
- Now localizations are listed as static functions in
MomentLocalizationsclass. Providing easier access - Made fixes in
ko_KO,de_DElocalizations - Includes endonym, language code, locale, English name in localization classes
0.2.0+2 #
- No longer prints the matched tokens
0.2.0 #
- Removed debug prints when using
.format(String payload). You can re-enable it by calling.enableDebugPrint()on the Moment instance - Exposed experimental Korean (ko_KO), German (de_DE) localizations
- Added localization aware formatters: L, LL, LLL, LLLL, LT, LTS
- Removed
localizationDefaultDateFormat(),localizationDefaultHourFormat()fromMomentLocalizationin favor of localization aware formatter - Revised some localizations
0.1.5 #
- Added MomentBenefits extenstion usage on README
- Testing on MomentBenefits extension
- Bugfixes
0.1.4+1 #
- Exposed the
MomentLocalization
0.1.4 #
- Exposed the localization in
Momentclass - Added
DateTime.toMoment({MomentLocalization: localization})function as extension onDateTime
0.1.3+1 #
- Exported localizations to
localizations/all.dart, and exposed it in the main file
0.1.3 #
- Started work of Korean (ko_KO) and German (de_DE) localizations
- Renamed
LocalizationtoMomentLocalizationfor the sake of universe
0.1.2 #
- Improved
Moment.formattokenization Moment.calendernow allowscustomFormat, which can be used instead of the localization's default format.- Fixes
0.1.1 #
- Fixed
Moment.formatfunction - Fixed negative sign appearing in relative date texts
0.1.0 #
- Initial beta release.