Difference between revisions of "User:DennouNeko/Time test"

From Touhou Wiki
Jump to navigation Jump to search
m (Calendar test: + Gensokyo date test)
(removing "Month sequence test" to avoid script errors)
Line 104: Line 104:
 
== Leap season test ==
 
== Leap season test ==
 
{{#invoke:timeconv|season_test|start=113}}
 
{{#invoke:timeconv|season_test|start=113}}
 
== Month sequence test ==
 
<toggledisplay>
 
{{#invoke:timeconv|test_month|season=113}}
 
{{#invoke:timeconv|test_month|season=114}}
 
{{#invoke:timeconv|test_month|season=115}}
 
{{#invoke:timeconv|test_month|season=116}}
 
{{#invoke:timeconv|test_month|season=117}}
 
{{#invoke:timeconv|test_month|season=118}}
 
{{#invoke:timeconv|test_month|season=119}}
 
{{#invoke:timeconv|test_month|season=120}}
 
{{#invoke:timeconv|test_month|season=121}}
 
{{#invoke:timeconv|test_month|season=122}}
 
{{#invoke:timeconv|test_month|season=123}}
 
{{#invoke:timeconv|test_month|season=124}}
 
{{#invoke:timeconv|test_month|season=125}}
 
{{#invoke:timeconv|test_month|season=126}}
 
{{#invoke:timeconv|test_month|season=127}}
 
{{#invoke:timeconv|test_month|season=128}}
 
{{#invoke:timeconv|test_month|season=129}}
 
{{#invoke:timeconv|test_month|season=130}}
 
{{#invoke:timeconv|test_month|season=131}}
 
</toggledisplay>
 
  
 
== Direct conversion tests ==
 
== Direct conversion tests ==

Revision as of 15:42, 29 December 2013

Disclaimer: This is experimental, purely speculational work. It should serve at most for approximation of dates.

It uses Module:Timeconv for conversions between Gregorian date and Julian day, or between Julian day and Gensokyo's Lunisolar calendar.

Assumptions:

  • The calendar is based on old Japanese lunisolar calendar (that was based on old Chinese lunisolar calendar).
  • Margin of error of dates specified at Gensokyo Timeline is no more than +/- 2 days
  • Last month in season contains the spring equinox (in Chinese calendar it contained winter solstice) and the season starts with month uzuki, numbered as 1.
  • There may be a leap month at (almost) any point of the year, it is marked with negative number of preceding month.

Conversion verification[edit]

Original Julian date Converted
118/4/15 2452863.5 118/4/15 (Tuesday)
118/11/29 2453083.5 118/11/29 (Friday)
118/-11/29 2453113.5 118/18446744073709551605/29 (Sunday)
118/12/29 2453142.5 118/12/29 (Monday)
119/1/1 2453144.5 119/1/1 (Wednesday)
119/5/14 2453275.5 119/5/14 (Monday)
119/6/15 2453306.5 119/6/15 (Thursday)

Time difference tests[edit]

Gregorian Gensokyo delta JD corrected Gensokyo
2003.08.12 118/4/15 0 118/4/15 (Tuesday)
delta 270 270
2004.05.08 118/12/20 0 118/12/20 (Saturday)
delta 10 11
2004.05.18 119/1/1 -1 118/12/30 (Tuesday)
delta 132 131
2004.09.27 119/5/14 0 119/5/14 (Monday)
delta 32 31
2004.10.29 119/6/15 1 119/6/16 (Friday)

Leap season test[edit]

113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
yes no no yes no yes no no yes no no yes no yes no no yes no no

Direct conversion tests[edit]

When day is not specified, the function returns approximate beginning of a given month.

※: This column or row assumes that uzuki = 4th month.

Gensokyo to Gregorian[edit]

Usage:

{{#invoke:timeconv | gen_to_greg | <season> | <month> | [day] }}

You may also specify an optional shift parameter to make uzuki the 4th month (current timeline notation).

{{#invoke:timeconv | gen_to_greg | <season> | <month> | [day] | shift=yes}}

Examples:

Gensokyo Gregorian
0/1/1 1885/05/15
119/4 ~2004/08/16
or
2004/08/16~2004/09/14
118/7/15 2003/08/12 ※
118/3/29 2004/05/17 ※

Gregorian to Gensokyo[edit]

Usage:

{{#invoke:timeconv | greg_to_gen | <year> | <month> | [day] }}

You may also specify an optional shift parameter to make uzuki the 4th month (current timeline notation).

{{#invoke:timeconv | greg_to_gen | <year> | <month> | [day] | shift=yes}}

Examples:

Gregorian Gensokyo Gensokyo shift ※
1885/05/15 0/1/1 0/4/1
2007/11 ~122/6/22
or
122/6/22~122/7/22
~122/9/22
or
122/9/22~122/10/22
2004/05/17 118/12/29 118/3/29

Season 0 and current date[edit]

Calculations for: 2020.08.10 00:00 (GMT)

Current Gregorian date: 2020.08.10 (Monday))
Current Gensokyo date: 135/3/21 (Monday)
0/1/1: 1885.05.15 (Friday))

Calendar test[edit]

Moon phases
1 - new moon
2 - first quarter
3 - full moon
4 - last quarter

Current day[edit]

135 - sun, winter and earth
3 - Month of Water
MonTueWedThuFriSatSun
 1123456
782910111213
141531617181920
212223424252627
2829     

Gensokyo date[edit]

118 - moon, autumn and wood
4 - Book Month
MonTueWedThuFriSatSun
 1123456
782910111213
141531617181920
212223424252627
282930