OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{ExtractFromTime.cpp} Namespace Reference

Functions

template<unsigned OFFSET>
DEVICE unsigned week_start_from_yoe (unsigned const yoe)
 

Variables

constexpr unsigned MONDAY = 2
 
constexpr unsigned SUNDAY = 3
 
constexpr unsigned SATURDAY = 4
 

Function Documentation

template<unsigned OFFSET>
DEVICE unsigned anonymous_namespace{ExtractFromTime.cpp}::week_start_from_yoe ( unsigned const  yoe)

Definition at line 39 of file ExtractFromTime.cpp.

References MARJAN.

39  {
40  unsigned const march1 = yoe * 365 + yoe / 4 - yoe / 100;
41  unsigned const jan4 = march1 + (MARJAN + 3);
42  unsigned const jan4dow = (jan4 + OFFSET) % 7;
43  return jan4 - jan4dow;
44 }
constexpr unsigned MARJAN

Variable Documentation

constexpr unsigned anonymous_namespace{ExtractFromTime.cpp}::MONDAY = 2

Definition at line 31 of file ExtractFromTime.cpp.

constexpr unsigned anonymous_namespace{ExtractFromTime.cpp}::SATURDAY = 4

Definition at line 33 of file ExtractFromTime.cpp.

constexpr unsigned anonymous_namespace{ExtractFromTime.cpp}::SUNDAY = 3

Definition at line 32 of file ExtractFromTime.cpp.