Apl2ToDoDateAndTimeAlgorithms
This is a sub-page of PhraseBook/ToDo/Apl2Idioms
I←1+0 100⊥0 12⊤(0 12⊥0 100⊤IS)-2+⌽⍳NS ⍝ NS months before date IS (YYYYMM).
I←1+0 100⊥0 12⊤(0 12⊥0 100⊤IS)-1+⌽⍳NS ⍝ NS months before date IS (YYYYMM).
I←1+0 100⊥0 12⊤(0 12⊥0 100⊤IS)+⍳NS ⍝ NS months after date IS (YYYYMM).
I←1+0 100⊥0 12⊤(0 12⊥0 100⊤IS)-1-⍳NS ⍝ NS months after date IS (YYYYMM).~
IS←0 12⊥0 100⊤IS ⍝ IS months from "0" given IS (YYYYMM) date.
IS←1+0 100⊥0 12⊤IS-1 ⍝ Date IS (YYYYMM) given IS months from "0".
APL Wiki