Door Games Unlimited

Welcome, Guest.


Subject: Date format setting or system toggle options Date: Mon Aug 11 2014 21:20:51
From: Deuce To: echicken

  Re: Date format setting or system toggle options
  By: echicken to Nightfox on Thu Jul 31 2014 11:02 am

 > Probably something like:
 >
 > if(strftime("%d/%m/%y") == system.datestr()) {
 >  // Format in use is dd/mm/yy
 > } else {
 >  // Format in use is mm/dd/yy
 > }

Better off using a known time value to avoid misdetection when the day is the 
                                                                              sa
me as the month.  system.datestr() can take a time_t value, so use constants:

if (system.datestr(1407817211) == "08/11/14")...

Adjust for your timezone as needed.

---
http://DuckDuckGo.com/ a better search engine that respects your privacy.
 ■ Synchronet ■ My Brand-New BBS (All the cool SysOps run STOCK!)

Previous Message       Next Message
In Reply To: Date format setting or system toggle options (echicken)
Replies: Date format setting or system toggle options (Deuce)