Created
December 7, 2021 10:22
-
-
Save blackhalt/659a4272e6e8e43c8656e87fcb073249 to your computer and use it in GitHub Desktop.
Datuma bookmaklets
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
javascript:var d = new Date(),month = d.getMonth() + 1,date = d.getDate(),year = d.getFullYear(),area = document.getElementsByTagName("textarea")[0];area.value = year +"-"+ month +"-"+ date;void 0 |
javascript:var dt = new Date();year = dt.getFullYear();month = (dt.getMonth() + 1).toString().padStart(2, "0");day = dt.getDate().toString().padStart(2, "0");area = document.getElementsByTagName("textarea")[0];area.value = year +"-"+ month +"-"+ day;void 0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
area.value = year +"-"+ ("0"+month).slice(-2) +"-"+ ("0"+date).slice(-2)