Last active
August 29, 2015 14:10
-
-
Save hibiyasleep/e38f252ba0dfd49da551 to your computer and use it in GitHub Desktop.
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
getErinnTime = function (date){ | |
var week = [ | |
'임볼릭', | |
'알반 에일레르', | |
'벨테인', | |
'알반 헤루인', | |
'루나사', | |
'알반 엘베드', | |
'삼하인' ] | |
var d = date || new Date() | |
var day = d.getDay() | |
var now = d.getTime() - d.getTimezoneOffset() * 60000 | |
return { | |
year: ~~((now / 8.64e7 - 12581.625) / 7), | |
month_name: week[day], | |
month: day, | |
day: ~~((now / 2.16e6) % 40) + 1, | |
hour: ~~((now / 9e4) % 24), | |
minute: ~~((now / 1500) % 60) | |
} | |
} | |
if(module && module.exports) module.exports = getErinnTime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment