[英]Initializing boost date to the first year of AD
I would want to initialize a gregorian date like this 我想初始化这样的格里高利日期
boost::gregorian::date d = { 1, 1, 1 };
but year = 1
is not allowed. 但是不允许
year = 1
。 How can I create a day before Jesus was born ? 我如何在耶稣出生前创造一天?
The current implementation of Gregorian date supports dates in the range 1400-Jan-01 to 9999-Dec-31. 格里高利日期的当前实施支持日期范围为1400-Jan-01至9999-Dec-31。 So handling a date outside this range is no directly possible.
因此,处理此范围之外的日期是不可能的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.