Skip to content

Instantly share code, notes, and snippets.

@sciooga
Created December 30, 2015 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sciooga/7aa13203feee21582d87 to your computer and use it in GitHub Desktop.
Save sciooga/7aa13203feee21582d87 to your computer and use it in GitHub Desktop.
bookmarklet: V2EX 主题日期转换
javascript:(function(){$('.header small').text(function(i, o){day = /(\d+) 天/.exec(o);if(day){date = new Date(2015,12,-1*(1+~~day[1]));return o.replace(/\d+ 天前/, date.getFullYear()+'年'+(date.getMonth()+1)+'月'+date.getDate()+'日');}});})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment