What calendar appears to count days since December 28, 1800?

 ̄綄美尐妖づ 提交于 2019-12-10 15:54:32

问题


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.

I know two dates for certain:

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.

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?


回答1:


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

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.

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.




回答2:


It could be Clarion. I'm working with similar old database conversion to SQL, and it figured out files (*.dat) were clarion




回答3:


I'm working with a system representing gregorian dates in julian calendar, if you want to convert a julian date to gregorian, you only need to add the quantity days to December 28 1800.

In SQL Server :

SELECT DATEADD(day, 58112, '18001228')

by example. Sorry, I don't speak english. The base date in your system is December 28 1800.




回答4:


It is not so strange. For example, date on Javacards is calculated by similiar scheme starting from 1986-02-04: http://forums.sun.com/thread.jspa?threadID=5421557&messageID=10894720#10894720




回答5:


Yes it is Clarion Data files. Use Edit1.Text := datetostr(encodedate(1800,12,28) );



来源:https://stackoverflow.com/questions/2607083/what-calendar-appears-to-count-days-since-december-28-1800

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!