@xh/hoist 79.0.0-SNAPSHOT.1765893892330 → 79.0.0-SNAPSHOT.1766020485210

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -197,6 +197,34 @@ export class LocalDate {
197
197
  return LocalDate.from(this.moment.subtract(value, unit));
198
198
  }
199
199
 
200
+ addWeekdays(value): LocalDate {
201
+ if (value < 0) {
202
+ return this.subtractWeekdays(Math.abs(value));
203
+ }
204
+
205
+ let ret: LocalDate = this;
206
+ while (value > 0) {
207
+ ret = ret.nextWeekday();
208
+ value--;
209
+ }
210
+
211
+ return ret;
212
+ }
213
+
214
+ subtractWeekdays(value): LocalDate {
215
+ if (value < 0) {
216
+ return this.addWeekdays(Math.abs(value));
217
+ }
218
+
219
+ let ret: LocalDate = this;
220
+ while (value > 0) {
221
+ ret = ret.previousWeekday();
222
+ value--;
223
+ }
224
+
225
+ return ret;
226
+ }
227
+
200
228
  startOf(unit): LocalDate {
201
229
  this.ensureUnitValid(unit);
202
230
  return LocalDate.from(this.moment.startOf(unit));