Skip to content

Instantly share code, notes, and snippets.

@ongaeshi
Created March 24, 2010 11:58
Show Gist options
  • Save ongaeshi/342224 to your computer and use it in GitHub Desktop.
Save ongaeshi/342224 to your computer and use it in GitHub Desktop.
TiddlyWikiにTwitterっぽいタイムスタンプを挿入するClipMenuのアクション
var date = new Date();
var month = date.getMonth() + 1;
if (month <= 9)
month = "0" + month;
var day = date.getDate();
if (day <= 9)
day = "0" + day;
var minutes = date.getMinutes();
if (minutes <= 9)
minutes = "0" + minutes;
var str = date.getFullYear() + "/" + month + "/" + day + " " + date.getHours() + ":" + minutes;
return "~~@@color(gray):" + str + "@@~~" + "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment