Cloud9Developer / Jellyfin-Newsletter-Plugin

GNU General Public License v3.0
66 stars 7 forks source link

Added {Day}, {Weekday}, {Month}, {Mon}, {Month_Num}, {Year} tags #116

Open lukasitaly opened 2 weeks ago

lukasitaly commented 2 weeks ago

This change partly resolves #109 by adding more date tags.

To better understand, imagine today's date is Tuesday the 21. August 2024

Added tags:

{Day} → Output = 21
{Weekday} → Output = Tuesday
{Month} → Output = August
{Mon} → Output = Aug
{Month_Num} → Output = 08
{Year} → Output = 2024

These dates will now be formatted depending on the cultureinfo. So if the system's culture is de-DE then the weekdays and months will be in German.

Changed: {Date} = The tag will now use the system culture to determine how it formats the date. For example: in Germany it will automatically use "21.08.2024" while in the US it'll use "08/21/2024"

The new tags were added to the config page with an example. I didn't want to add the tags to the README yet. Please take into consideration that this is my first commit in C#, but since the changes weren't all too big, it should hopefully work :)

Cloud9Developer commented 2 weeks ago

Thanks! I'll try to review/test then merge later today (If I can find a moment)

lukasitaly commented 1 week ago

Have you had a chance to review it yet? Just asking because I am curious if my code is any good, not to pressure or stress you :)

EDIT: Just saw on a different Issue that you said you'll be/are on vacation. Enjoy it, this stuff can wait!

Cloud9Developer commented 2 days ago

Hey! Promise I'm still trying to get to this lol. Been busy and was on vacation last week with family :)

lukasitaly commented 34 minutes ago

Hey, don't worry, you're doing this in your free time and have no obligation. Family time is more important. Whenever you get to it! :)