Repository navigation
lib/datetime: Reduce cognitive complexity of core datetime functions #7598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4e3bb53
23d1282
f90c85b
2d352bc
e6b04d0
3fc1d2f
43c906f
e49ad67
63b37c8
431cf23
6cd5d8b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [pre-commit] reported by reviewdog 🐶 Lines 214 to 233 in 6cd5d8b
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,9 +5,66 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Read the file GPL.TXT coming with GRASS for details. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #include <grass/datetime.h> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static void make_incr(DateTime *, int, int, DateTime *); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /* Handles the "round == 0" branch for (to < dt->to): increment using all lost values */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [pre-commit] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static void apply_round0_lost(DateTime *dt, int to, DateTime *incr) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| int pos; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| int ndays; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (datetime_is_absolute(dt)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ndays = datetime_days_in_year(dt->year, dt->positive); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ndays = 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (pos = dt->to; pos > to; pos--) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| make_incr(incr, pos, pos, dt); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr->year = dt->year; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr->month = dt->month; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr->day = dt->day + ndays / 2; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr->hour = dt->hour; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr->minute = dt->minute; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr->second = dt->second; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| datetime_increment(dt, incr); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (ndays > 0 && pos == DATETIME_DAY) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /* Returns 1 if any “lost” component between dt->to down to (to+1) is non-default */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [pre-commit] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static int has_lost_non_default(const DateTime *dt, int to, int x) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| int pos; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (pos = dt->to; pos > to; pos--) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| switch (pos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case DATETIME_MONTH: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (dt->month != x) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case DATETIME_DAY: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (dt->day != x) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case DATETIME_HOUR: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (dt->hour != x) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case DATETIME_MINUTE: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (dt->minute != x) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case DATETIME_SECOND: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (dt->second != (double)x) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /*! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * \brief | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -101,78 +158,35 @@ int datetime_change_from_to(DateTime *dt, int from, int to, int round) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /* if losing precision, round | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * round > 0 force up if any lost values not zero | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * round ==0 increment by all lost values | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (to < dt->to) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (round > 0) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| int x; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| x = datetime_is_absolute(dt) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (carry = 0, pos = dt->to; carry == 0 && pos > to; pos--) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| switch (pos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case DATETIME_MONTH: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (dt->month != x) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| carry = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case DATETIME_DAY: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (dt->day != x) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| carry = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case DATETIME_HOUR: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (dt->hour != 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| carry = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case DATETIME_MINUTE: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (dt->minute != 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| carry = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case DATETIME_SECOND: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (dt->second != 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| carry = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (carry) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| make_incr(&incr, to, to, dt); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.year = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.month = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.day = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.hour = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.minute = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.second = 1.0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| datetime_increment(dt, &incr); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (round == 0) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /*NEW*/ if (datetime_is_absolute(dt)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /*NEW*/ ndays = datetime_days_in_year(dt->year, dt->positive); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /*NEW*/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /*NEW*/ ndays = 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (pos = dt->to; pos > to; pos--) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| make_incr(&incr, pos, pos, dt); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.year = dt->year; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.month = dt->month; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /*NEW*/ incr.day = dt->day + ndays / 2; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.hour = dt->hour; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.minute = dt->minute; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.second = dt->second; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| datetime_increment(dt, &incr); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /*NEW*/ if (ndays > 0 && pos == DATETIME_DAY) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /*NEW*/ break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static void round_lost_precision(DateTime *dt, int to, int round) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DateTime incr; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| int pos, carry, ndays; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (to >= dt->to) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (round > 0) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| int x = datetime_is_absolute(dt) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| carry = has_lost_non_default(dt, to, x); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (carry) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| make_incr(&incr, to, to, dt); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.year = 1; incr.month = 1; incr.day = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| incr.hour = 1; incr.minute = 1; incr.second = 1.0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| datetime_increment(dt, &incr); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (round == 0) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apply_round0_lost(dt, to, &incr); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+161
to
+186
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [pre-commit] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [pre-commit] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| round_lost_precision(dt, to, round); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [pre-commit] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /* set the new elements to zero */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (pos = from; pos < dtfrom; pos++) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -183,68 +183,42 @@ static int _datetime_compare(const DateTime *a, const DateTime *b) | |||
| int i; | ||||
|
|
||||
| if (a->positive && !b->positive) | ||||
| return (1); | ||||
| else if (b->positive && !a->positive) | ||||
| return (-1); | ||||
| return 1; | ||||
| if (b->positive && !a->positive) | ||||
| return -1; | ||||
|
|
||||
| /* same signs */ | ||||
| for (i = a->from; i <= a->to; i++) { | ||||
| switch (i) { | ||||
| int c = 0; | ||||
|
|
||||
| switch (i) { | ||||
| case DATETIME_SECOND: | ||||
| if (a->second > b->second) | ||||
| return (1); | ||||
| else if (a->second < b->second) | ||||
| return (-1); | ||||
| c = (a->second > b->second) - (a->second < b->second); | ||||
| break; | ||||
|
|
||||
| case DATETIME_MINUTE: | ||||
| if (a->minute > b->minute) | ||||
| return (1); | ||||
| else if (a->minute < b->minute) | ||||
| return (-1); | ||||
| c = cmp_int(a->minute, b->minute); | ||||
| break; | ||||
|
|
||||
| case DATETIME_HOUR: | ||||
| if (a->hour > b->hour) | ||||
| return (1); | ||||
| else if (a->hour < b->hour) | ||||
| return (-1); | ||||
| c = cmp_int(a->hour, b->hour); | ||||
| break; | ||||
|
|
||||
| case DATETIME_DAY: | ||||
| if (a->day > b->day) | ||||
| return (1); | ||||
| else if (a->day < b->day) | ||||
| return (-1); | ||||
| c = cmp_int(a->day, b->day); | ||||
| break; | ||||
|
|
||||
| case DATETIME_MONTH: | ||||
| if (a->month > b->month) | ||||
| return (1); | ||||
| else if (a->month < b->month) | ||||
| return (-1); | ||||
| c = cmp_int(a->month, b->month); | ||||
| break; | ||||
|
|
||||
| case DATETIME_YEAR: /* only place sign matters */ | ||||
| if (a->positive) { | ||||
| if (a->year > b->year) | ||||
| return (1); | ||||
| else if (a->year < b->year) | ||||
| return (-1); | ||||
| } | ||||
| else { | ||||
| if (a->year < b->year) | ||||
| return (1); | ||||
| else if (a->year > b->year) | ||||
| return (-1); | ||||
| } | ||||
| c = cmp_year_signed(a, b); | ||||
| break; | ||||
| } | ||||
|
|
||||
| if (c != 0) | ||||
| return c; | ||||
| } | ||||
| return (0); | ||||
|
|
||||
| return 0; | ||||
| } | ||||
|
|
||||
|
|
||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [pre-commit] reported by reviewdog 🐶
Suggested change
|
||||
| /*************************************************************/ | ||||
|
|
||||
| static int _datetime_ymd_to_ddays(const DateTime *dtymd, double *days) | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pre-commit] reported by reviewdog 🐶
grass/lib/datetime/change.c
Lines 191 to 211 in 6cd5d8b