TIP: Click on subject to list as thread! ANSI
echo: sync_programming
to: GitLab note in main/sbbs
from: Rob Swindell
date: 2024-08-16 18:28:00
subject: DDFileLister: Now support

https://gitlab.synchro.net/main/sbbs/-/merge_requests/453#note_5532

This looks like an odd way to do this conversion to a time_t value.

You're aware the Date object has multiple constructors? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date

So, I think you could boil function this down to a single line that doesn't involve any string formatting or parsing:
`return new Date(pYear, pMonthNum - 1, pDayNum, pHour, pMinute, pSecond === undefined ? 0 : pSecond);`
--- SBBSecho 3.20-Linux
                                               
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)

SOURCE: echomail via QWK@pharcyde.org

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™.