- Added
formatOffset
to Zones
- Allow the zone argument to Interval.fromISO with duration components
- Ignore the zone argument to Duration factory methods
- Fix keepLocalTime calculations that span offset changes
- Fixed ISO formatting for dates > 999
- Performance improvements for regex parsing
- Support numberSystem in fromFormat
- Fix validity for bad initial zone specifiers
- Fix cross-month diffs in some scenarios
- Fix time zone parsing when the time zone isn't at the end
- Memoize IANA zone creation
- Add some explicit CDN support to the NPM package
- Add week token to duration ISO support
- Lots of cleanup and test coverage changes
setZone("local")
now returns the defaultZone if it is set- Fixes for the polyfilled build
- Allow 24:00 in ISO (and other) strings
- Fix some bugs with the typecheck functions like
DateTime.isDateTime()
- Fixed handling of some characters in fromFormat literal sections
- Hanlde string values in object arguments to DateTime methods
- Fixed toRelativeCalendar's handling of zones in the base date
- Fix DateTime#plus() when spanning across AD 100
- Fix low-year handling for IANA zones
DateTime#toLocal()
now uses the default locale- Fix zero duration formatting
- Many documentation fixes
- Fix endOf("day") during DSTs (#399)
- Add `Interval#mapEndpoints (#400)
- Add
DateTime#zone
andInfo.normalizeZone
(#404)
- Add
DateTime#toRelative
andDateTime#toRelativeCalendar
- Allow "UTC" in the zone position of
fromSQL
- Force
isDateTime
andisDuration
to return booleans in all cases
- Trim leading \u200e characters from offset names in Edge 16 and 17
- Add
DateTime.fromSeconds
andDateTime#toSeconds
- Floor the seconds instead of rounding them when outputting the 'X' format
- Change the options to toLocale to override the configuration (the previous options were essentially ignored)
- Fixing merge error that resulted in bad error messages
- midly breaking Rework negative durations
- Fix handling weekdays at the end of leap week years
- Add isDuration, isDateTime, and isInterval
- Fix handling of Luxon object arguments passed from other execution contexts
- Improved error message
- Added DateTime#invalidExplanation, Duration#invalidExplanation, Interval#invalidExplanation to provide more details on invalid objects
- Cache Intl objects for an 85x speed up on basic operations using non-en locales
- Fix minified builds
- Fix hour formatting in RFC822 strings
- Interval.fromISO accepts formats with durations
Removal accidentally-introduced runtime dependency
- Handle locale strings with BCP 47 extensions. Especially helpful for environments with funky default locales
- Support for [weekYear]-W[weekNumber] ISO 8601 strings
- Empty diffs now have all the asked-for units in them, set at 0
- Duration operations perserve the superset of units
- Add x and X to toFormat for formatting Epoch seconds and Epoch milliseconds
- Parser allows a wider range of IANA zone specifiers
- BREAKING: Etc/GMT+10 is now interpreted as UTC-10, per spec
Documentation fixes
- DateTime.fromMillis will throw if passed a non-number
- Fixes for type checking across JS contexts
- Include milliseconds in Duration#toISO
- Avoid deprecation warning from DateTime#inspect in Node 10
- mildly breaking change Duration.toFormat now floors its outputs instead of rounding them (see #224)
- Added 'floor' option to Duration.toFormat and deprecated the 'round' option
- Added
Dateime.toBSON
- Fixed infinite loop when passing invalid or zero-length durations to Interval#splitBy
- Added better error handling to Duration.fromObject()
- 222x speed-up in DateTime creation for non-en locales
- Added
DateTime#toMillis
alias forDateTime#valueOf
- Fixed types on zone exports
- Export Zone classes
- Fix
endOf
andstartOf
for quarters - Change
toFormat("Z")
to return a number for UTC - Allow "GTM" as an argument to
setZone
- Support for zone names with more than two components
- Fixed long-term-accurate conversions for months
- Added
weeksInWeekYear
- The big one-oh. No changes from 0.5.8.
- Large perf improvements for
DateTime#toFormat()
, when using non-intl numbers
- Added AMD build to the NPM package
- Large performance improvements to technical formatting (e.g.
DateTime#toISO
)
- Refactor internals
- Added support for fractional seconds in
Duration.fromISO
- Added browser global to the NPM package
- Best-we-can-do fix for
DateTime#toLocaleString()
for fixed-offset zones when showing the zone name in the output - Fixed
Duration#shiftTo
for unormalized Durations that need a rollup cascade
- Fix default locales in Node
- Fix prototype to help with React inspection
- Improve REPL output for Durations in Node
- Remove errant ICU runtime dep (again)
- Remove comments from minified builds (introduced by 0.5.1)
- Fixed minified builds (oops)
- Fix computation of fractional parts of diffs
isBefore()
returns true for the end of the interval, consistent with being half-openzoneName
now rturnsnull
for invalid DateTimes- Added quarter support
- Adding a month to Jan 31 gives Feb 28/29
- Always round down to the nearest millisecond when parsing
- Fixed
toLocaleString
for fixed-offset zones in the absence of Intl - Added
Info.isValidIANAZone
- Made malformed zone specifiers result in invalid DateTime instances
- Rename DateTime.fromString to DateTime.fromFormat (leaving deprecated DateTime.fromString)
- Rename DateTime.fromStringExplain to DateTime.fromFormatExplain (leaving deprecated DateTime.fromStringExplain)
- Support Etc/GMT IANA zones
- Perf fixes for zones
- Rework build infrastructure
- Fix DateTime.fromObject's handling of default zones
- Change
keepCalendarTime
tokeepLocalTime
- Handle no arguments in
DateTime.min
andDateTime.max
- Documentation fixes
- Fix bug where Durations could sometimes mutate
- Fix
DateTime.fromMillis(0)
more thoroughly
- Fix sourcemaps
- Fix
DateTime.fromMillis(0)
- Fix 'h' and 'hh'
toFormat
tokens for midnight
- Better
shiftTo
behavior for durations with floating point components
- Fix
toHTTP
to use 24-hour hours - Tighten up regular expressions
- Various documentation fixes
- Fixes for
diff
with multiple units
- Fixes for
fromSQL
,toSQL
,toSQLTime
, andtoSQLDate
- Add
includeOffset
option totoISO
andtoISOTime
- Add
module
field to package.json
- Remove polyfills from main builds
- Update compilation toolchain to target builds more exactly
- Fix IE in polyfill build
- Add
.fromSQL
,#toSQL
,#toSQLTime
,#toSQLDate
- Fix AM/PM parsing
- Major perf improvements
- Default to system locale when using macro formats in
#toFormat
.fromISO
accepts standalone times- See moment#93 for important news concerning field accessibility
- Add 'u' formatting and parsing
- Add 'y', 'yyyyy', and 'yyyyyy' parsing tokens
- Add 'yyyyyy' formatting token
- Better error messages for missing arguments to
DateTime.fromString
- Fix zones for Edge
- Fix
fromISO
to accept various levels of subsecond precision
- Fixed parsing for ordinals
- Made parsing stricter
- Fixed formatting for non-hour aligned fixed-offset zones
- Fixed longterm conversion accuracy option in diffs
- Fixed invalid handling in
Interval#set
- Fixing formatting for fixed-offset zones
- Fixes for IE 9 & 10
- Fixing busted release 0.0.14
- toLocaleString() and others default to the system's locale
- support for ISO week durations in
Duration.fromISO
- Improve non-Intl fallbacks for toLocaleString
- Fix
offsetNameShort
andoffsetNameLong
for non-Intl environments - Added
weekdayShort
,weekdayLong
,monthShort
,monthLong
DateTime getters
- Only include build dir in NPM module
- Move to Moment Github org
- The local zone can now report its IANA name
- Fixed parsing bug for
yy
andkk
- Improved test coverage
- Added
toLocaleParts
- Slightly more friendly month/weekday parsing
- Default locale setting
- Stricter
toJSDate
fromISO
now supportsyear
andyear-month
formats- More graceful degradation in the absence of platform features
Experimental, but now broadly useful.