the-carlisle-group / text2date Goto Github PK
View Code? Open in Web Editor NEWText to Date Conversion for Dyalog APL
Text to Date Conversion for Dyalog APL
This should also be an option built in to Dado.
The string 200000801
converts as it should with YYYYMMDD. It also converts with YYYYDDMM which is reasonable, if maybe wrong. However it also converts with DDYYYYMM, as it thinks the year 0008 is simply 08, which converts to 2008 which is clearly wrong.
This should probably be automatic and part of Dado.
Allow multiple format strings? Or should this be left up to the application?
...when packaged as a single function. Probably related to capsules...
Add "Excel" format for serial numbers. Or maybe all alphanumeric formats? It's trivial. Or overkill?
Handle Jan, Feb, etc., in fixed and var formats. And January, February, etc., in variable formats.
under ⎕VFI.
Specifically validating dates in type 60/61 format, seems to take a long time.
Add a third optional left argument item "anchor year" that defaults to the current ⎕TS year. This will allow two digit years to be evaluated relative to any period in time, not just the current time, with the sliding window. This would useful for 2 digit DOBs from the early 20th century, many of which would be from the 1800s.
can easily arise because we are combining integer elements before checking them. Thus a 2 digit year can combine with a 4 digit month to produce a valid date. Variable width formats should be (roughly) pre-validated before decoded. That is, months should be 12 and under, days, 31 and under, etc. No need to worry about leap years etc.
For example :
'MMMDY' Text2Date '12/31/1999' '1/1/2000'
19991231 20000101
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.