Files
exectos/xtoskrnl/rtl/data.cc
Aiken Harris 3b76146d53
Some checks failed
Builds / ExectOS (amd64, debug) (push) Failing after -59m32s
Builds / ExectOS (amd64, release) (push) Failing after -59m35s
Builds / ExectOS (i686, debug) (push) Failing after -59m32s
Builds / ExectOS (i686, release) (push) Failing after -59m34s
Implement time conversion routines for Unix and XT epoch formats
2026-04-24 17:48:44 +02:00

26 lines
888 B
C++

/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtoskrnl/rtl/data.cc
* DESCRIPTION: Runtime Library global and static data
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
*/
#include <xtos.hh>
/* This is required for floating numbers to keep LLVM happy */
XTCLINK INT _fltused = 0xFEEDBULL;
/* Lookup table for days in a month, Index 0 is normal year, Index 1 is leap year */
CUSHORT RTL::Time::DaysInMonth[2][12] = {
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
};
/* Lookup table for days preceding a month, Index 0 is normal year, Index 1 is leap year */
CUSHORT RTL::Time::DaysPrecedingMonth[2][12] = {
{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334},
{0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335}
};