Thread: getTimeStamp()
View Single Post
  #23  
Old 11-07-2008, 10:17 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by LoneAngelIbesu View Post
Not using a single function, it doesn't.

PHP Code:
function hellRavenFormalTime() {
  
temp.ctime adjustTimeZone(timevar2,-5); // to EST
  
temp.date getDate(temp.ctime);
  
temp.clock = {getHour(temp.ctime),getMinutes(temp.ctime),getSeconds(temp.ctime)};
  return 
getFormalDayEnglish(getWeekday(temp.ctime)) @ ", " @
         
getFormalMonthEnglish(temp.date[1]) SPC getFormalNumber(temp.date[2]) @ ", " temp.date[0] @ " @ " @
         
to12Hour(temp.clock[0]) @ ":" doubleDigit(temp.clock[1]) @ ":" doubleDigit(temp.clock[2]) SPC getAMPM(temp.clock[0]) SPC "EST";

PHP Code:
function timestamp() {
  return 
shared.date("l, F jS, @ g:i:s a T");

Which one do you think somebody new to GS2 would be able to use more easily? You guys seem to think that every scripter on Graal is an expert.
Don't insult other people's intelligence.

Date functions like that are rather language independent and if a proper explanation is provided it could easily be figured out by someone knew to scripting, provided they understand the basics. Obviously there would also be one or two default timestamp formats also.
__________________
Reply With Quote