April-Gras / obsidian-auto-timelines

Simple timeline generator plugin for story tellers using obsidian
MIT License
120 stars 5 forks source link

[BUG] Start date missing (Regex tested + Date specified) #181

Closed naelsoufi closed 3 months ago

naelsoufi commented 3 months ago

Describe the bug My regex works in regex tester but the dates aren't pulled by the timeline visualizer. I feel like I'm missing something obvious but I don't see why it works in the regex editor and not here...

To Reproduce Here's the regex code i've parsed into the Date parser regex: (?<day_number>-?[0-9]*) (?<day_type>inv\.|av\. bal\.|bal\.|av\. fin\.|fin\.|av\. inv\.) (?<month>[A-zÀ-ú]+ [A-z]+), (?<year>[0-9]*)

Here's the YMLD for the test note i'm trying to pull: `--- aat-event-start-date: -8 av. fin. Pélor II, 5955 aat-event-end-date: -6 av. fin. Pélor II, 5955 timelines:

And here's the code I used to display the timeline `

session

`

Here's the result in the live preview and reading mode :

image

My settings are as following: Date parser group priority: year,month,day_type,day_number Date display format: {day_number} {day_type} {month}, {year}

I then have my year, month, day_number, day_type all configured. year and day_number are numerics and month and day_type are strings.

Expected behavior I'm expecting the date to be pulled instead of being missing...

Screenshots My regex working in a regex tester: image

Desktop (please complete the following information): -OS : iOS 14.2.1

naelsoufi commented 3 months ago

Ok I just figured that even if it's a string, I need to input a number and that letters regex do not work for the plugin. My bad I'm new to regex...

If you have further info feel free to reopen, I'm eager to learn.