MCPcopy Create free account
hub / github.com/SatDump/SatDump / FormatDateTime

Function FormatDateTime

src-core/imgui/implot/implot.cpp:1144–1154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1142 }
1143
1144int FormatDateTime(const ImPlotTime& t, char* buffer, int size, ImPlotDateTimeSpec fmt) {
1145 int written = 0;
1146 if (fmt.Date != ImPlotDateFmt_None)
1147 written += FormatDate(t, buffer, size, fmt.Date, fmt.UseISO8601);
1148 if (fmt.Time != ImPlotTimeFmt_None) {
1149 if (fmt.Date != ImPlotDateFmt_None)
1150 buffer[written++] = ' ';
1151 written += FormatTime(t, &buffer[written], size - written, fmt.Time, fmt.Use24HourClock);
1152 }
1153 return written;
1154}
1155
1156inline float GetDateTimeWidth(ImPlotDateTimeSpec fmt) {
1157 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