Comments (4)
@OhMyDeera Unfortunately I have spent quite a bit of time trying to fix this issue but its almost impossible to make this generic.
I am going to update the setting in the creator to reflect that this is for the Display Date format, and require dashes when parsing.
from calendarium.
I did play with this updating this to allow spaces:
let datebits = datestring.split(/(?!^)[-ββ](?![^[]*])/);
but unfortunately that ignores other delimiters that could be used in a date format. Realistically I need to actually parse these bits against the format that was specified.
from calendarium.
Yeah that's a good point. I only did a quick scan through the code, but can take a more in depth look and try to come up with an actual solution once I've got some time if you'd like.
One idea could be using RegExp and using the date format supplied in the config to build a dynamic regex to get the day, month and year regardless of what seperators they are using. Though doing so whilst also making sure the recurring dates still parse as expected may prove to be fiddly.
from calendarium.
Yeah that's a good point. I only did a quick scan through the code, but can take a more in depth look and try to come up with an actual solution once I've got some time if you'd like. One idea could be using RegExp and using the date format supplied in the config to build a dynamic regex to get the day, month and year regardless of what seperators they are using. Though doing so whilst also making sure the recurring dates still parse as expected may prove to be fiddly.
I think what would help most is any suggestion of additional tests for formats. ;) we have some, but obviously forgot this one. That way we fix this w/o breaking others.
A split based on (any non-word/non-digit character) could also do it. The other option is not to use split at all, but use regex find. We need the first three, and then the starting position of content after that as the ordinal.
from calendarium.
Related Issues (20)
- Issue with Editing and Deleting Events HOT 2
- πOffset of intercalary months is not working
- π Unable to create Events or Event Categories HOT 1
- Calendar-specific settings layout broken on iPad HOT 9
- π Unable to create moons
- π§©Alternate display for non-standard Calendar formats
- π Year view brokes calendar HOT 3
- π Custom Year not working.
- π Obsidian crashes on Android with Calendarium on HOT 14
- π Option to stop opening in sidebar
- Calendar does not show at all HOT 3
- Using a Custom Year Completely Breaks the Calendar
- Import csv from Aeon Timeline
- Moon Phase doesn't appear on hover
- π Modify month settings are not saved properly
- 𧩠Support year 0 (again)
- 𧩠Advance/ Previous Day Command
- π Displayed 'today' date altered by Eras
- π Fantasy Calendar not migrating to Calendarium HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calendarium.