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
Show hidden characters
{ | |
"presets": ["es2015"], | |
"plugins": ["transform-runtime"] | |
} |
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
from functools import reduce | |
def concate(*args): | |
return reduce( | |
lambda func1, func2: lambda value: func2(func1(value)), | |
args | |
) |
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
import datetime | |
import pytz | |
# ロケールのないdatetimeにロケール情報を与える | |
d = datetime.datetime.now() # naiveなローカルな時刻を取得 | |
d2 = pytz.timezone("Asia/Tokyo").localize(d) | |
# ロケールを変更する | |
d3 = d2.astimezone(pytz.utc) |
NewerOlder