-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I may very well be doing something incorrectly, but there seems to be a bug when parsing a date/time with AM/PM at the end
Sample Code
import std.stdio;
import datefmt;
void main()
{
string dateStr = "2026-02-11 03:33 AM";
auto observationTime = dateStr.parse("%Y-%m-%d %I:%M %p");
writeln(observationTime.format("%H:%M"));
}Error
object.Exception@../../../../.dub/packages/datefmt/1.0.4/datefmt/source/datefmt.d(166): trailing data: AM
----------------
../../../../.dub/packages/datefmt/1.0.4/datefmt/source/datefmt.d:166 @safe std.datetime.systime.SysTime datefmt.parse(immutable(char)[], immutable(char)[], immutable(std.datetime.timezone.TimeZone), bool) [0x565248df7537]
source/app.d:16 _Dmain [0x565248dd6ba0]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels