Servis-Rhino 4211B Guia do Utilizador Página 146

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 298
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 145
minute
second
millisecond
quarter
week
weekday
compare() - Compares two dates and returns 0 if they are the same, positive if the first is
after the second and negative if the first is before the second.
getDaysInMonth() - The number of days in the month.
isLeapYear() - Returns true if the year is a leap year.
getTimezoneName() - Returns the name of the time zone.
dojo/date/locale
This is the work horse of the Dojo date and time formatting.
It has the following methods
format(date, options) – This formats a date to a string. The options is a rich object
containing:
datePattern – A formatting string describing how the date should be formatted.
String literals should be placed inside single quotes.
selector – How should the date be formatted. Choices include "date" and "time".
The default is both date and time.
parse(value, options) – This parses a string and returns a Date object.
isWeekend(date, locale) – Returns true if this is a "weekend".
dojo/date/stamp
This class provides the conversion to and from ISO8601 format which is "YYYY-MM-
DD'T'HH:mm:ss.SSS".
It has the following methods:
fromISOString(string) – Converts a string to a Date object.
toISOString(dateObject, options) – Converts a Date object to a string. The
options to this method include:
selector – Determines which parts of the string to build. The default is both date and
time but other options include:
date
time
zulu – A boolean. If selected, UTC/GMT will be used for the timezone.
Page 146
Vista de página 145
1 2 ... 141 142 143 144 145 146 147 148 149 150 151 ... 297 298

Comentários a estes Manuais

Sem comentários