By default, this method formats both date and time from dateObject. Formatting patterns are chosen appropriate to the
locale. Different formatting lengths may be chosen, with “full” used by default. Custom patterns may be used or
registered with translations using the dojo/date/locale::addCustomFormats()
method. Formatting patterns are implemented using the syntax described at unicode.org.

By simply passing a JavaScript Date object to format(), Dojo will use the locale passed as dojoConfig.locale or
the browser’s default to handle the formats, and you may choose from a variety of formats: “short”, “medium”, “full”, or
“long”.

Various other options are available to format the date. You may choose to process only the date, only the time, or both,
and you may decide to use your own custom datePattern or timePattern.

Other times, field widths are meant to be interpreted literally, (e.g. qwdDh ...)

In some cases widths are ignored, (e.g. a)

Pattern

Meaning

Thu Mar 26 2009 13:37:43.777 (EST)

Notes

G

era

AD

“

“

Anno Domini

GGGG

y

year

2009

yyy

qQ

quarter

1

M

month

March

MMMM

w

week of the year

12

d

date

26

D

day of the year

85

E

day of the week

Thursday

EEEE

“

“

Thu

EEE

a

am/pm

PM

h

hours by 1-12

1

H

hours by 0-23

13

K

hours by 0-11

k

hours by 1-24

m

minutes

37

s

seconds

43

S

milliseconds

777

SSS

vz

timezone

EST

Z

timezone offset

GMT-04:00

ZZZZ

“

“

-0400

Z

Notes:

Everything in this module assumes Gregorian calendars. For other calendars, see dojox/date

The representation of timezone names vary by browser and operating system. The string is simply parsed and passed through from the representation in Date.toString(). For more precise handling of timezones, see dojox/date

A single quote can be incorporated in a quoted string by supplying 2 of them, for example ‘o’‘clock’