Changeset 3167
- Timestamp:
- 02/11/08 01:22:29 (10 months ago)
- Files:
-
- trunk/tango/time/Time.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tango/time/Time.d
r3166 r3167 468 468 in the Gregorian calendar is Time.epoch - TimeSpan.days(1). 469 469 470 Note: common system epochs are provided to allow calculation of time 471 in other time systems. For example, to convert a Time myTime to Unix 472 time (number of seconds elapsed since 1/1/1970), you can write: 473 474 -------- 475 auto unixTime = (myTime - Time.epoch1970).seconds; 476 -------- 477 470 478 ******************************************************************************/ 471 479 … … 482 490 /// Represents the smallest and largest Time value. 483 491 static const Time min = {minimum}, 484 max = {maximum}, 485 epoch = {0}, 486 epoch1601 = {TimeSpan.Epoch1601}, 487 epoch1970 = {TimeSpan.Epoch1970}; 492 max = {maximum}; 493 494 /// Represents the epoch (1/1/0001) 495 static const Time epoch = {0}; 496 497 /// Represents the epoch of 1/1/1601 (Commonly used in Windows systems) 498 static const Time epoch1601 = {TimeSpan.Epoch1601}; 499 500 /// Represents the epoch of 1/1/1970 (Commonly used in Unix systems) 501 static const Time epoch1970 = {TimeSpan.Epoch1970}; 488 502 489 503 /**********************************************************************












