TIP: Click on subject to list as thread! ANSI
echo: mbse
to: All
from: Ken Bowley
date: 2016-10-05 07:49:56
subject: date format ideas

Hello everybody!

I was talking with a friend/co-worker about the date format issue with MBSE, 
and he asked if we could just use standard strftime formats.  This seems like 
an idea that would reduce much of the complication involved with this change.

The changes to records would be a small string (6 bytes?) for the default 
system format, and the same for user preferences.

Display changes would be very simple, since they could just use strftime to 
format the date display.

The GetDate function in mbsebbs/input.c would need to need to understand the 
strftime format (or a reduced/simplified subset that includes %Y, %m, and %d), 
and adjust the handling of user import accordingly.

The language files currently have the date format hardcoded for the prompts to 
enter dates for "Date of Birth" and for entering a date when
searching files. 
These will need to be more flexible.  Perhaps something similar to what is 
needed for GetDate will work for templating the date format in the language 
files.

Along with these changes is having MBSE use a time_t rather than a string when 
possible so we can get rid of code (only two places that I can think of at the 
moment) that manipulates a date string into a YYYYMMDD format before turning 
it into an integer for comparison and sorting.

Ken


--- GoldED+/LNX 1.1.5-b20160827 - MBSE BBS - Debian GNU/Linux
* Origin: The Realm of Darkness |(623)907-2858| bbs.trod.org (1:114/485)
SEEN-BY: 11/0 103/705 114/485 120/229 323 481 502 544 545 546 640 123/500
SEEN-BY: 140/1 154/10 203/0 220/10 226/301 227/51 60 400 230/0 261/38 280/464
SEEN-BY: 280/5003 423/120 633/267 280 640/384 712/620 848 770/1 2215/15 300
SEEN-BY: 2320/100 304
@PATH: 114/485 120/544 2320/100 280/464 712/848 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.