Last active
December 28, 2022 07:01
-
-
Save kobake/e30966480737754d608f to your computer and use it in GitHub Desktop.
GitHub の「... days ago」みたいな所を日時表示に展開するブックマークレット ref: http://qiita.com/kobake@github/items/06dcc5b6135fd38adeb7
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
javascript:(function(){$('time').each(function(){var t = new Date($(this).attr('datetime'));var full = '';full += t.getFullYear() + '/';full += ('0' + (t.getMonth() + 1)).slice(-2) + '/';full += ('0' + t.getDate()).slice(-2) + ' ';full += ('0' + t.getHours()).slice(-2) + ':';full += ('0' + t.getMinutes()).slice(-2) + ':';full += ('0' + t.getSeconds()).slice(-2);$(this).text(full);});})(); |
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
$('time').each(function(){ | |
var t = new Date($(this).attr('datetime')); | |
var full = ''; | |
full += t.getFullYear() + '/'; | |
full += ('0' + (t.getMonth() + 1)).slice(-2) + '/'; | |
full += ('0' + t.getDate()).slice(-2) + ' '; | |
full += ('0' + t.getHours()).slice(-2) + ':'; | |
full += ('0' + t.getMinutes()).slice(-2) + ':'; | |
full += ('0' + t.getSeconds()).slice(-2); | |
$(this).text(full); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment