Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 10th, 2010  |  syntax: ColdFusion  |  size: 0.65 KB  |  views: 337  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <cfscript>
  2. function twitterDate(date,offset) {
  3.         var retDate = listtoarray(date, " ");
  4.         var thisDay = retDate[1];
  5.         var thisMonth = retDate[2];
  6.         var thisDate = retDate[3];
  7.         var thisTime = timeformat(retDate[4], "h:mm tt");
  8.         var thisYear = retDate[6];
  9.         var thisReturn = "";
  10.         var thisFormat = "#thisMonth#, #thisDate# #thisYear#";
  11.        
  12.         thisFormat = dateformat(thisFormat, "m/d/yy") & " " & thisTime;
  13.         thisFormat = dateadd("s", offset, thisFormat);
  14.         thisFormat = dateadd("h", 1, thisFormat);
  15.  
  16.         longFormat = dateformat(thisFormat, "yyyy-mm-dd") & " " & timeformat(thisFormat, "HH:mm:ss");
  17.  
  18.         thisReturn = longFormat;
  19.         return thisReturn;
  20. }
  21. </cfscript>