View source code
							
							
						
								Display the source code in std/datetime/package.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Module std.datetime
Phobos provides the following functionality for time:
| Functionality | Symbols | 
|---|---|
| Points in Time | Date TimeOfDay DateTime SysTime | 
| Timezones | TimeZone UTC LocalTime PosixTimeZone WindowsTimeZone SimpleTimeZone | 
| Intervals and Ranges of Time | Interval PosInfInterval NegInfInterval | 
| Durations of Time | Duration weeks days hours minutes seconds msecs usecs hnsecs nsecs | 
| Time Measurement and Benchmarking | MonoTime StopWatch benchmark | 
This functionality is separated into the following modules
- stdfor points in time without timezones.- .datetime - .date 
- stdfor classes which represent timezones.- .datetime - .timezone 
- stdfor a point in time with a timezone.- .datetime - .systime 
- stdfor types which represent series of points in time.- .datetime - .interval 
- stdfor measuring time.- .datetime - .stopwatch 
See Also
                 Introduction to std.datetime
        ISO 8601
                     Wikipedia entry on TZ Database
                     List of Time Zones
Example
Get the current time from the system clock
import stdExample
Construct a specific point in time without timezone information and get its ISO string.
import stdExample
Construct a specific point in time in the UTC timezone and add two days.
import stdAuthors
Jonathan M Davis and Kato Shoichi
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.