MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / FormatDateTime

Function FormatDateTime

Source/3rdParty/implot/implot.cpp:1182–1192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1180 }
1181
1182int FormatDateTime(const ImPlotTime& t, char* buffer, int size, ImPlotDateTimeSpec fmt) {
1183 int written = 0;
1184 if (fmt.Date != ImPlotDateFmt_None)
1185 written += FormatDate(t, buffer, size, fmt.Date, fmt.UseISO8601);
1186 if (fmt.Time != ImPlotTimeFmt_None) {
1187 if (fmt.Date != ImPlotDateFmt_None)
1188 buffer[written++] = ' ';
1189 written += FormatTime(t, &buffer[written], size - written, fmt.Time, fmt.Use24HourClock);
1190 }
1191 return written;
1192}
1193
1194inline float GetDateTimeWidth(ImPlotDateTimeSpec fmt) {
1195 static const ImPlotTime t_max_width = MakeTime(2888, 12, 22, 12, 58, 58, 888888); // best guess at time that maximizes pixel width

Callers 3

GetDateTimeWidthFunction · 0.85
LabelAxisValueFunction · 0.85
Formatter_TimeFunction · 0.85

Calls 2

FormatDateFunction · 0.85
FormatTimeFunction · 0.85

Tested by

no test coverage detected