自1800年12月28日以来,日历上显示的日期是什么? [英] What calendar appears to count days since December 28, 1800?

查看:527
本文介绍了自1800年12月28日以来,日历上显示的日期是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务是从一些奇怪的旧系统读取一些数据。

系统包含许多日期,但它们都是奇怪的格式。它们是从大约 55,000 80,000 的整数。

I have been tasked to read in some data from some weird old system.
The system contains many dates but they are all oddly formatted. They are integer numbers ranging from approximately 55,000 to 80,000.

我知道两个日期确定:

58,112 equals February 5, 1960  (originally written as Feb 2,1960 [*])
61,439 equals March 16, 1969

[*] This typo explains some of the comments initially challenging the
    leap-year awareness of the calendar.

对我来说,这些整数是从1800年12月28日以来经过的天数。我想这是一个非常奇怪的日期,开始一个日历。有可能是闰年的事情,什么 - 以后不会导致问题。

It appears to me that those integer numbers are the number of days elapsed since December 28, 1800. But I think that's a very strange date to start a calendar on. There is probably going something on with leap years and what-not that is going to cause problems later on.

有人认识这个日历吗?任何人都可以告诉我什么正确的方式是将这些整数转换为人类可读的日期?

Does anyone recognise this calendar? Can anyone tell me what the proper way is to convert those integers to human readable dates?

推荐答案

听起来像一个定制系统,但是一个很奇怪的:)

sounds like a bespoke system to me, but a rather strange one :)

一种转换方式将总是工作是使用某种date_add()函数 - 你不指定哪种语言,但是大多数现代语言应该有一个方法来添加一个日期到一个日期。

one way to convert that will always work is use some sort of date_add() function - you don't specify which language you're using but most modern languages should have a way to add a bunch of days to a date.

关于闰年,如果这两个日期是正确的,那么你不应该有一个问题,肯定有至少1闰年betweek 1960年和1969年:)它绝对值得检查一些更近的​​日期,只是为了确保,

regarding leap years, if those 2 dates are correct then you shouldn't have a problem, there was definitely at least 1 leap year betweek 1960 and 1969 :) it's definitely worth checking a few more recent dates just to make sure though.

这篇关于自1800年12月28日以来,日历上显示的日期是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆