Naming Conventions |
|||||
|
Scalar |
Vector |
Matrix |
Any |
Non- |
Boolean |
BS |
BV |
BM |
BA |
BN |
Integer |
IS |
IV |
IM |
IA |
IN |
Float |
FS |
FV |
FM |
FA |
FN |
Numeric |
NS |
NV |
NM |
NA |
NN |
Character |
CS |
CV |
CM |
CA |
CN |
Enclosed |
ES |
EV |
EM |
EA |
EN |
enclosed |
TS |
TV |
TM |
TA |
TN |
Simple |
SS |
SV |
SM |
SA |
SN |
Any |
AS |
AV |
AM |
AA |
AN |
phrase e.g.: .X...Y. ⍝ X←BS; Y←IV |
|||||
combinations: use ISV for Integer scalar∨vector |
|||||
B3, I4 &c. to specify higher ranks. |
|||||
SplitDate
Transform an array of integer scalars representing YYYYMMDD into an array of 1 higher rank with three columns representing YYY MM DD.
⍉0 100 100⊤ISV
Examples
0 100 100⊤⍉20100102
2010 1 2
⍉0 100 100⊤⍉20100102 19991231
2010 1 2
1999 12 31
⍉0 100 100⊤⍉2 2⍴20100102 19991231 30000101 30001231
2010 1 2
1999 12 31
3000 1 1
3000 12 31The initial transpose on the right, which is redundant for scalar or vector IA, ensures that all other dimensions return to the correct order after the second transpose with the new first dimension moved to the last position.
Compatibility
Checked with: APL2, APLX, Dyalog, NARS2000
Test Cases
Show test cases
Test my code, both Examples and Test Cases.
See also: JoinDate
Mentor: KaiJaeger
Tags: <TransformDate> <IntAsDate>
APL Wiki