This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf_8 -*- | |
def yearToWareki (year): | |
r""" | |
result: tuple [('元号', 年, 日数), ('元号', 年, 日数)] | |
2つ目の要素はほぼないが、変わり目の時にある | |
""" | |
# 明治元年: 1868 | |
# 明治45年: 1912 (~7/29) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
def is_uru (year): | |
if year % 4 == 0: | |
if year % 400 == 0: | |
return True | |
elif year % 100 == 0: | |
return False | |
return True | |
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<link href="style.css" rel="stylesheet" type="text/css"> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
</head> | |
<body> |
NewerOlder