todo check day
This commit is contained in:
1 parent
599c12ef87
commit
45378559ca
1 file changed
+7
@@ -425,7 +425,14 @@ var ashgabatZone = time.FixedZone("+05", 5*60*60)
|
|||||||
// are always adjacent, this alone also produces the right month-end cutoff
|
// are always adjacent, this alone also produces the right month-end cutoff
|
||||||
// (e.g. if the 31st is a Sunday, the 30th is a Saturday, so the 29th -
|
// (e.g. if the 31st is a Sunday, the 30th is a Saturday, so the 29th -
|
||||||
// Friday - is the last payable day) without any separate month-end logic.
|
// Friday - is the last payable day) without any separate month-end logic.
|
||||||
|
// TODO: re-enable before deploying to prod - temporarily left open to allow
|
||||||
|
// testing the pay flow on weekends.
|
||||||
|
const skipPayableDayCheck = true
|
||||||
|
|
||||||
func isPayableDay(t time.Time) bool {
|
func isPayableDay(t time.Time) bool {
|
||||||
|
if skipPayableDayCheck {
|
||||||
|
return true
|
||||||
|
}
|
||||||
wd := t.In(ashgabatZone).Weekday()
|
wd := t.In(ashgabatZone).Weekday()
|
||||||
return wd != time.Saturday && wd != time.Sunday
|
return wd != time.Saturday && wd != time.Sunday
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user