Skip to content

Instantly share code, notes, and snippets.

@fernandotakai
Created September 14, 2008 04:50
Show Gist options
  • Save fernandotakai/10705 to your computer and use it in GitHub Desktop.
Save fernandotakai/10705 to your computer and use it in GitHub Desktop.
nountime.diff
var noun_type_time = {
_name: "time",
default: function(){
var time = Date.parse("now");
var text = time.toString("hh:mm tt")
return CmdUtils.makeSugg(text, null, time)
},
suggest: function(text, html){
if (typeof text != "string"){
return [];
}
var time = Date.parse( text );
if(!time ){
return []
}
text = time.toString("hh:mm tt");
return [ CmdUtils.makeSugg(text, null, time) ]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment