View source code
Display the source code in std/datetime/systime.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.
std.datetime.systime.SysTime.yearBC
- multiple declarations
Function SysTime.yearBC
Year B.C. of the Gregorian Calendar counting year 0 as 1 B.C.
ushort yearBC() @property scope @safe const;
Throws
DateTimeException
if isAD
is true.
Example
import std .datetime .date : DateTime;
writeln(SysTime(DateTime(0, 1, 1, 12, 30, 33)) .yearBC); // 1
writeln(SysTime(DateTime(-1, 1, 1, 10, 7, 2)) .yearBC); // 2
writeln(SysTime(DateTime(-100, 1, 1, 4, 59, 0)) .yearBC); // 101
Function SysTime.yearBC
Year B.C. of the Gregorian Calendar counting year 0 as 1 B.C.
void yearBC
(
int year
) @property scope @safe;
Parameters
Name | Description |
---|---|
year | The year B.C. to set this SysTime 's year to. |
Throws
DateTimeException
if a non-positive value
is given.
Authors
License
Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.