Skip to content

Commit

Permalink
Merge pull request #506 from ocadotechnology/468_de-deprecate-locale
Browse files Browse the repository at this point in the history
feature(date/time pickers): Un-deprecate the locale methods
  • Loading branch information
Charlie Frater committed Aug 2, 2018
2 parents dffbb45 + ade3af9 commit 97210b1
Show file tree
Hide file tree
Showing 10 changed files with 547 additions and 171 deletions.
30 changes: 21 additions & 9 deletions docs/content/docs/date-picker/api/auto.um
Original file line number Diff line number Diff line change
Expand Up @@ -900,11 +900,15 @@

@method locale
@added 0.13.0
@deprecated 1.1.0
@issue 23
@issue 24
@description
Use @code[hx.preferences.locale] to get the locale for a page.
@extra
@removed nextReleaseVersion
@notice [De-deprecated]
@description
This method was deprecated in 1.1.0 in favour of using
@code[hx.preferences.locale] however after reviewing this it has been
de-deprecated in version nextReleaseVersion and updated to work in a more
effective manner.


@description
A function for updating the locale used in the date picker.
Expand All @@ -924,11 +928,19 @@

@method locale
@added 0.13.0
@deprecated 1.1.0
@issue 23
@issue 24
@updated nextReleaseVersion
@issue 468
@description
Use @code[hx.preferences.locale] to set the locale for a page.
Updated the locale method to allow per-instance locales and un-deprecated the locale methods

@extra
@removed nextReleaseVersion
@notice [De-deprecated]
@description
This method was deprecated in 1.1.0 in favour of using
@code[hx.preferences.locale] however after reviewing this it has been
de-deprecated in version nextReleaseVersion and updated to work in a more
effective manner.

@description
A method for getting the currently set locale.
Expand Down
56 changes: 56 additions & 0 deletions docs/content/docs/date-time-picker/api/auto.um
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,20 @@

@method locale
@added 0.13.0
@updated nextReleaseVersion
@issue 468
@description
Updated the locale method to allow per-instance locales and un-deprecated the locale methods

@extra
@removed nextReleaseVersion
@notice [De-deprecated]
@description
This method was deprecated in 1.1.0 in favour of using
@code[hx.preferences.locale] however after reviewing this it has been
de-deprecated in version nextReleaseVersion and updated to work in a more
effective manner.

@description
A function for updating the locale used in the datetimepicker.

Expand All @@ -858,13 +872,55 @@

@method locale
@added 0.13.0
@updated nextReleaseVersion
@issue 468
@description
Updated the locale method to allow per-instance locales and un-deprecated the locale methods

@extra
@removed nextReleaseVersion
@notice [De-deprecated]
@description
This method was deprecated in 1.1.0 in favour of using
@code[hx.preferences.locale] however after reviewing this it has been
de-deprecated in version nextReleaseVersion and updated to work in a more
effective manner.

@description
A method for getting the currently set locale.

@returns [String]
@description
The currently set locale.

@method timezone
@added nextReleaseVersion
@issue 468
@description
Added a method to allow the setting of per-instance timezones

@description
Sets the timezone for this @type[DateTimePicker]

@returns [DateTimePicker]
@description
This DateTimePicker

@method timezone
@added nextReleaseVersion
@issue 468
@description
Added a method to allow the setting of per-instance timezones

@description
Gets the timezone for this @type[DateTimePicker]

@returns [String]
@description
The currently set timezone. Falls back to
@code[hx.preferences.timezone()] if one has not been set for this
instance

@method disabled
@added 0.15.2
@description
Expand Down
61 changes: 61 additions & 0 deletions docs/content/docs/preferences/api/auto.um
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@
@added 1.1.0
@issue 23

@removed nextReleaseVersion

@description
A method that takes a date and returns a new date with the timezone offset applied.

Expand All @@ -363,6 +365,31 @@
@description
The date, offset by the timezone amount.

@method applyTimezoneOffset
@added nextReleaseVersion
@description
Updated the offset argument to additionally take a @code[timezone]
string directly instead of needing the numeric offset

@description
A method that takes a date and returns a new date with the timezone offset applied.

@arg date [Date]
@description
The date to offset

@arg? timezoneOrOffset [String/Number]
@description
The timezone or offset to apply. Gets the offset from the timezone
when passing a string or uses the offset value directly.

If this is not provided, the offset is retrieved from the currently set
timezone.

@returns [Date]
@description
The date, offset by the timezone amount.

@method supportedTimezones
@added 1.1.0
@issue 23
Expand Down Expand Up @@ -427,6 +454,40 @@
@description
This Preferences

@method isLocaleSupported
@added nextReleaseVersion
@description
Added a method for checking whether the locale is supported

@description
Checks the list of @code[supportedLocales] to see whether the locale is
supported

@arg locale [String]
@description
The locale to check

@returns [Boolean]
@description
Whether the locale is in the list of supported locales

@method isTimezoneSupported
@added nextReleaseVersion
@description
Added a method for checking whether the timezone is supported

@description
Checks the list of @code[supportedTimezones] to see whether the timezone
is supported

@arg timezone [String]
@description
The timezone to check

@returns [Boolean]
@description
Whether the timezone is in the list of supported timezones

@event timezonechange
@description
Emitted when the time zone changes.
Expand Down
71 changes: 61 additions & 10 deletions docs/content/docs/time-picker/api/auto.um
Original file line number Diff line number Diff line change
Expand Up @@ -546,11 +546,19 @@

@method locale
@added 0.13.0
@deprecated 1.1.0
@issue 23
@issue 24
@updated nextReleaseVersion
@issue 468
@description
Use @code[hx.preferences.locale] to get the locale for a page.
Updated the locale method to allow per-instance locales and un-deprecated the locale methods

@extra
@removed nextReleaseVersion
@notice [De-deprecated]
@description
This method was deprecated in 1.1.0 in favour of using
@code[hx.preferences.locale] however after reviewing this it has been
de-deprecated in version nextReleaseVersion and updated to work in a more
effective manner.

@description
A function for updating the locale used in the time picker.
Expand All @@ -560,6 +568,7 @@
@@codeblock js
timepicker.locale('pl') // sets the timepicker's locale to Poland


@arg locale [String]
@description
The locale string to update the time picker with.
Expand All @@ -570,18 +579,60 @@

@method locale
@added 0.13.0
@deprecated 1.1.0
@issue 23
@issue 24
@updated nextReleaseVersion
@issue 468
@description
Updated the locale method to allow per-instance locales and un-deprecated the locale methods

@extra
@removed nextReleaseVersion
@notice [De-deprecated]
@description
This method was deprecated in 1.1.0 in favour of using
@code[hx.preferences.locale] however after reviewing this it has been
de-deprecated in version nextReleaseVersion and updated to work in a more
effective manner.

@description
@version 0.13.0
A method for getting the currently set locale

@version nextReleaseVersion
Gets the locale for this time picker. If one has not been set, falls
back to @code[hx.preferences.locale()]

@returns [String]
@description
The currently set locale. Falls back to @code[hx.preferences.locale()]
if one has not been set for this @type[TimePicker]

@method timezone
@added nextReleaseVersion
@issue 468
@description
Added a method to allow the setting of per-instance timezones

@description
Sets the timezone for this @type[TimePicker]

@returns [TimePicker]
@description
This TimePicker

@method timezone
@added nextReleaseVersion
@issue 468
@description
Use @code[hx.preferences.locale] to set the locale for a page.
Added a method to allow the setting of per-instance timezones

@description
A method for getting the currently set locale.
Gets the timezone for this @type[TimePicker]

@returns [String]
@description
The currently set locale.
The currently set timezone. Falls back to
@code[hx.preferences.timezone()] if one has not been set for this
instance

@method date
@added 0.13.0
Expand Down
Loading

0 comments on commit 97210b1

Please sign in to comment.