Introduce Month enum.
Use designated initializers instead of comments to ensure that tm_data
is initialized correctly. Use Month enum for initializing .tm_mon to
avoid off-by-one errors.
Co-authored-by: Raman Tenneti <rtenneti@google.com>
Paths
| Differential D144357
[libc] Add Month enum, refactor mktime_test ClosedPublic Authored by jeffbailey on Feb 19 2023, 7:59 PM.
Details
Summary Introduce Month enum. Use designated initializers instead of comments to ensure that tm_data Co-authored-by: Raman Tenneti <rtenneti@google.com>
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 19 2023, 7:59 PM This revision is now accepted and ready to land.Feb 21 2023, 9:18 AM Closed by commit rG9ad0ac8eb3d0: [libc] Add Month enum, refactor mktime_test (authored by jeffbailey). · Explain WhyFeb 21 2023, 9:24 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 499210 libc/src/time/time_utils.h
libc/test/src/time/mktime_test.cpp
|