17 if (rInput.size() < 6)
20 std::u16string_view
prefix = rInput.substr(0, 2);
24 std::u16string_view sYear = rInput.substr(2, 4);
26 std::u16string_view sMonth(
u"01");
27 if (rInput.size() >= 8)
28 sMonth = rInput.substr(6, 2);
30 std::u16string_view sDay(
u"01");
31 if (rInput.size() >= 10)
32 sDay = rInput.substr(8, 2);
34 std::u16string_view sHours(
u"00");
35 if (rInput.size() >= 12)
36 sHours = rInput.substr(10, 2);
38 std::u16string_view sMinutes(
u"00");
39 if (rInput.size() >= 14)
40 sMinutes = rInput.substr(12, 2);
42 std::u16string_view sSeconds(
u"00");
43 if (rInput.size() >= 16)
44 sSeconds = rInput.substr(14, 2);
46 OUString sTimeZoneMark(
"Z");
47 if (rInput.size() >= 17)
48 sTimeZoneMark = rInput.substr(16, 1);
50 std::u16string_view sTimeZoneHours(
u"00");
51 std::u16string_view sTimeZoneMinutes(
u"00");
52 if ((sTimeZoneMark ==
"+" || sTimeZoneMark ==
"-") && rInput.size() >= 22)
54 std::u16string_view sTimeZoneSeparator = rInput.substr(19, 1);
55 if (sTimeZoneSeparator ==
u"'")
57 sTimeZoneHours = rInput.substr(17, 2);
58 sTimeZoneMinutes = rInput.substr(20, 2);
62 OUString sTimeZoneString;
63 if (sTimeZoneMark ==
"+" || sTimeZoneString ==
"-")
64 sTimeZoneString = sTimeZoneMark + sTimeZoneHours +
":" + sTimeZoneMinutes;
65 else if (sTimeZoneMark ==
"Z")
66 sTimeZoneString = sTimeZoneMark;
68 return OUString::Concat(sYear) +
"-" + sMonth +
"-" + sDay +
"T" + sHours +
":" + sMinutes +
":"
69 + sSeconds + sTimeZoneString;
OUString convertPdfDateToISO8601(std::u16string_view rInput)