Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
SkPDF::DateTime Struct Reference

#include <SkPDFDocument.h>

Public Member Functions

void toISO8601 (SkString *dst) const
 

Public Attributes

int16_t fTimeZoneMinutes
 
uint16_t fYear
 e.g. 2005 More...
 
uint8_t fMonth
 1..12 More...
 
uint8_t fDayOfWeek
 0..6, 0==Sunday More...
 
uint8_t fDay
 1..31 More...
 
uint8_t fHour
 0..23 More...
 
uint8_t fMinute
 0..59 More...
 
uint8_t fSecond
 0..59 More...
 

Detailed Description

Definition at line 69 of file SkPDFDocument.h.

Member Function Documentation

◆ toISO8601()

void SkPDF::DateTime::toISO8601 ( SkString dst) const

Definition at line 704 of file SkPDFDocument.cpp.

704 {
705 if (dst) {
706 int timeZoneMinutes = SkToInt(fTimeZoneMinutes);
707 char timezoneSign = timeZoneMinutes >= 0 ? '+' : '-';
708 int timeZoneHours = SkTAbs(timeZoneMinutes) / 60;
709 timeZoneMinutes = SkTAbs(timeZoneMinutes) % 60;
710 dst->printf("%04u-%02u-%02uT%02u:%02u:%02u%c%02d:%02d",
711 static_cast<unsigned>(fYear), static_cast<unsigned>(fMonth),
712 static_cast<unsigned>(fDay), static_cast<unsigned>(fHour),
713 static_cast<unsigned>(fMinute),
714 static_cast<unsigned>(fSecond), timezoneSign, timeZoneHours,
715 timeZoneMinutes);
716 }
717}
static T SkTAbs(T value)
Definition: SkTemplates.h:43
constexpr int SkToInt(S x)
Definition: SkTo.h:29
dst
Definition: cp.py:12
uint8_t fMinute
0..59
Definition: SkPDFDocument.h:77
uint8_t fMonth
1..12
Definition: SkPDFDocument.h:73
uint8_t fDay
1..31
Definition: SkPDFDocument.h:75
uint16_t fYear
e.g. 2005
Definition: SkPDFDocument.h:72
uint8_t fSecond
0..59
Definition: SkPDFDocument.h:78
int16_t fTimeZoneMinutes
Definition: SkPDFDocument.h:70
uint8_t fHour
0..23
Definition: SkPDFDocument.h:76

Member Data Documentation

◆ fDay

uint8_t SkPDF::DateTime::fDay

1..31

Definition at line 75 of file SkPDFDocument.h.

◆ fDayOfWeek

uint8_t SkPDF::DateTime::fDayOfWeek

0..6, 0==Sunday

Definition at line 74 of file SkPDFDocument.h.

◆ fHour

uint8_t SkPDF::DateTime::fHour

0..23

Definition at line 76 of file SkPDFDocument.h.

◆ fMinute

uint8_t SkPDF::DateTime::fMinute

0..59

Definition at line 77 of file SkPDFDocument.h.

◆ fMonth

uint8_t SkPDF::DateTime::fMonth

1..12

Definition at line 73 of file SkPDFDocument.h.

◆ fSecond

uint8_t SkPDF::DateTime::fSecond

0..59

Definition at line 78 of file SkPDFDocument.h.

◆ fTimeZoneMinutes

int16_t SkPDF::DateTime::fTimeZoneMinutes

Definition at line 70 of file SkPDFDocument.h.

◆ fYear

uint16_t SkPDF::DateTime::fYear

e.g. 2005

Definition at line 72 of file SkPDFDocument.h.


The documentation for this struct was generated from the following files: