Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70

localization_date.format

Description

...

For example, take the thirtieth day in the month of April for the year 2013. For the US locale, the phone would display 04/30/2013. If your phone's localization setting were set to the UK and you used this library, your display would read 30/04/2013.

Basic Example: 

Code Block
var formattedDate = localization_date.format(parameters);

Additional display behaviors:

...

date.format with different versions

Code Block
var dateString = date.format({
    'date' : '1985-08-11',
    'version' : 'short'
});  // sets dateString to '8/11/85'
  
dateString = date.format({
    'date' : '1985-08-11',
    'version' : 'long'
});  // sets dateString to '11/8/85 0:00'