Broken down time is handled with a time structure in the C language. Breaking down a time value in that context can require several lines of code. However, JavaScript provides the Date object class, which supports methods for accessing the separate time and date components.
The following time components are available:
Year number
Month in year
Date within month
Day of week
Hour within day
Minute within hour
Second within minute
Millisecond within second
Time of day in milliseconds
These values are available measured in either local time or UTC time.
There are also facilities to convert back and forth between local time and UTC time.
Prev | Home | Next |
break | Up | Browser |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |