Skip to content

v3.0.0

Latest
Compare
Choose a tag to compare
@shepherdsam shepherdsam released this 08 Feb 17:32
· 20 commits to master since this release

Added

  • Timezone support for Utils.parseDateTimeField()
  • Locale support for Utils.parseDateTimeField()

Utils.parseDateTimeField(date [, Object]) takes a second optional parameter of object.

  • timezone defaults to UTC
  • locale defaults to en

Usage:

Utils.parseDateTimeField('today at 3pm', {
  timezone: 'Europe/London',
  locale: 'en-GB'
});

Breaking change

Upgraded Sugar Date module from 1.x to 2.x. See Sugar breaking changes

Date object no longer gets extended with SugarDate by default. If you want to extend the Date object you must call Utils.activateDateParser().