www.webOShelp.net

Get the latest on:webOS Developers' RSS FeedwebOS Facebook page webOS Twitter Feed

Home Resources API Reference Mojo.Format.formatRelativeDate(date, options)

Mojo.Format.formatRelativeDate(date, options)

Formats the date object based on the specified parameters. Returns String containing the formatted date.

Parameter Type Description
date Date Date object to be formatted
options String|Object

String: Desired date format: short, medium, long, full, or default.  If date is in the last week, it returns the localized day.  If yesterday, today or tomorrow, it returns the localized strings for those days. Otherwise it returns the full date.

Object: See below.

options object properties:

Parameter Type Description
format String Desired date format: short, medium, long, full, or default.  If date is in the last week, it returns the localized day.  If yesterday, today or tomorrow, it returns the localized strings for those days. Otherwise it returns the full date.
countryCode String Two letter IETF/ISO 639 code for a country/region.
 

0 Comments

    Add Comment


      • >:o
      • :-[
      • :'(
      • :-(
      • :-D
      • :-*
      • :-)
      • :P
      • :\
      • 8-)
      • ;-)