Fix locale defaulting
See Upgrading section in README.md
- Fix ISO parsing for offset specifiers in Year-Ordinal formats
- Fix GMT zone parsing for older versions of Node
- Support multiple units in
toRelative
- Various documentation updates
- Add fromISOTime, toISOTime and toMillis to Duration (#803)
- Fix padding of negative years in IsoDate (#871)
- Fix hasSame unit comparison (#798)
- Export VERSION information (#794)
- Durations are considered equal with extra zero units. Fixes #809 (#811)
- fix fromFormat with Intl formats containing non-breaking spaces
- Support higher precision in ISO milliseconds
- Some fixes for 00:30 timezones
- Fix some throwOnInvalid for invalid Intervals
- Various doc fixes
- Fix Interval#isSame for empty intervals
- Mark package as side effect-free
- Add support for intervals with a large number of seconds
- Remove erroneous
console.log
call
- Update polyfills for pollyfilled build
- Allow minus sign prefix when creating Duration from ISO
- Added more details to error messages for type errors
- Added support for ISO basic format to DateTime#toISO
- Fix setZone's handling of pre-1970 dates with milisecond components
- Fix keepLocalTime for large jumps near the target zone's DST
- Fix cache perf for toRelative()
- Fix parsing of meridiems in macro tokens in newer versions of v8
- Fix bug in Chrome Canary that threw off time zone calculations
- Fix for quarter parsing
- Some documentation updates
- Added quarter support to the parser
- Fix some rounding issues in ISO formatting
- Added Duration#mapUnits
- added Interval#toISODate and Interval#toISOTime
- Some documentation fixes
- Cache offset values
- Fix handling of negative sub 1-hour offsets
- Speculative fix for Node 6
- Fix Intl.DateTimeFormat usage for polyfills
- Interval#splitAt now ignores input dates outside the interval
- Don't allow decimals in DateTime creation
- Fix handling of decimals in DateTime#plus and #minus
- Fix validity when adding or subtracting time that exceeds Date max/min boundaries
- Add support for macro tokens in the parser
- Fix issue with
toRelative
usingstyle: short
with plural days
- Reject out-of-range numbers in DateTime.fromMillis
- Reject 0s in ISO date inputs
- DateTime.min and DateTime.max throw if they get the wrong kind of arguments
- Fixed throwOnInvalid logic for Interval
- Added
DATETIME_MED_WITH_WEEKDAY
preset
- Catch errors trying to use Intl in weird versions of IE 11
- Fixed locale default logic for `DateTime#toFormat("ZZZZ")
- 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.