Created
August 15, 2018 15:13
-
-
Save plushevy/fa21d158acc48d0682f5c12bbc1b0618 to your computer and use it in GitHub Desktop.
Вывод дат и времени
This file contains hidden or 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
| var optionsDay = { | |
| weekday: 'long' | |
| }; | |
| var optionsTime = { | |
| hour: "2-digit", | |
| minute: "2-digit" | |
| }; | |
| var optionsDate = { | |
| year: 'numeric', | |
| month: 'numeric', | |
| day: 'numeric', | |
| }; | |
| var day = new Date().toLocaleString("ru", optionsDay); | |
| var time = new Date().toLocaleString("ru", optionsTime); | |
| var date = new Date().toLocaleString("ru", optionsDate); | |
| \\"среда" | |
| \\"20:12" | |
| \\"15.08.2018" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment