CommunityScripts icon indicating copy to clipboard operation
CommunityScripts copied to clipboard

[Feature] Accept additional date formats

Open holly-hacker opened this issue 4 years ago • 7 comments

Is your feature request related to a problem? Please describe. I often manually tag content by copying data from a web page. For one of my sources the date format is YYYY/MM/DD (eg. 2021/10/25) and it gets rejected since stash only accepts dates that in the format YYYY-MM-DD. I have to change the slashes to dashes and this is somewhat annoying.

Describe the solution you'd like Accept more date formats, such as YYYY/MM/DD. I can't currently think of other date formats, except perhaps RFC3339 (eg. 2021-04-12T23:20:50.52Z).

Describe alternatives you've considered none

Additional context none

holly-hacker avatar Nov 16 '21 16:11 holly-hacker

I often manually tag content by copying data from a web page.

Why not use/write a scraper? If you used a scraper, it could parse the date from YYYY/MM/DD for you.

peolic avatar Nov 16 '21 17:11 peolic

The platform I use doesn't have a scraper and you can't look for files by their file name anyway so that's not an option (it is similar to patreon). I may write a plugin for it in the future though, if that's possible.

holly-hacker avatar Nov 16 '21 19:11 holly-hacker

well, it is possible to look up files by name, It's explicitly a feature in scrapers.

You could write a scraper that uses your auth for this paywalled content either byName or fragment should work for this, alternatively if you are content with copy/paste, write a userscript to change the dates on the origin site.

stg-annon avatar Nov 16 '21 19:11 stg-annon

I mean that the website I use does not allow searching by file name. If I end up writing a plugin, I can do the research on what I can or can't do but for now I just want to see the ability to enter different date formats.

holly-hacker avatar Nov 16 '21 19:11 holly-hacker

the problem here is you would somehow have to be able to magically know the format you are receiving if you accept multiple, for example how would stash know that the user entered 12-11-2021 vs 11-12-2021 both of these are the same date in different formats so how is stash to know which to pick accepting a single standard makes it so there is no confusion here,

stg-annon avatar Nov 16 '21 20:11 stg-annon

I understand that there is ambiguity when working with MM/DD/YYYY and DD/MM/YYYY, but that's not what I'm asking. I only want both YYYY/MM/DD and YYYY-MM-DD to be accepted (ie. the separator character can be both / and -).

holly-hacker avatar Nov 17 '21 09:11 holly-hacker

Safe to close as this could be solved by a userscript or a UI plugin

Maista6969 avatar Jan 17 '24 15:01 Maista6969