time: Change signature of get_jdn() to use int types
This commit is contained in:
parent
dbd145b6c4
commit
33f238fb3f
|
@ -9,7 +9,7 @@
|
|||
#include <lib/misc.h>
|
||||
|
||||
// Julian date calculation from https://en.wikipedia.org/wiki/Julian_day
|
||||
static uint64_t get_jdn(uint8_t days, uint8_t months, uint16_t years) {
|
||||
static int get_jdn(int days, int months, int years) {
|
||||
return (1461 * (years + 4800 + (months - 14)/12))/4 + (367 *
|
||||
(months - 2 - 12 * ((months - 14)/12)))/12 -
|
||||
(3 * ((years + 4900 + (months - 14)/12)/100))/4
|
||||
|
|
Loading…
Reference in New Issue