* Retrieves the next date part in the list of parts.
()
| 402 | * Retrieves the next date part in the list of parts. |
| 403 | */ |
| 404 | nextPart(): Option.Option<DatePart> { |
| 405 | return Arr.findFirstIndex(this.parts, (part) => part === this).pipe( |
| 406 | Option.flatMap((currentPartIndex) => |
| 407 | Arr.findFirst(this.parts.slice(currentPartIndex + 1), (part) => !part.isToken()) |
| 408 | ) |
| 409 | ) |
| 410 | } |
| 411 | |
| 412 | /** |
| 413 | * Retrieves the previous date part in the list of parts. |