You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wasn't able to download the birthdays of the next week because them are written like "monday" and not like "day/month".
The workaround was to replace the 'weekday name' with 'day/month'.
My FB locale is italian so I replaced sabato (Saturday) with 10/8, domenica (Sunday) with 11/8 and so on.
I added the following dates at line 608, before parsed_date = datetime.strptime(birthday_date_str, locale_date_format_mapping[user_locale])
Here is the code, simple but working:
if birthday_date_str == 'sabato':
birthday_date_str = '10/8'
if birthday_date_str == 'domenica':
birthday_date_str = '11/8'
if birthday_date_str == 'lunedì':
birthday_date_str = '12/8'
if birthday_date_str == 'martedì':
birthday_date_str = '13/8'
if birthday_date_str == 'mercoledì':
birthday_date_str = '14/8'
if birthday_date_str == 'giovedì':
birthday_date_str = '15/8'
if birthday_date_str == 'venerdì':
birthday_date_str = '16/8'```
The text was updated successfully, but these errors were encountered:
Hey, this feature is actually already supported. There is no need to hardcode the day names but its good that it worked for you. Keep in mind hard coding the dates will not work as they will change if you run it in the future.
The problem you may have faced is system locale issues mentioned here: #27
I wasn't able to download the birthdays of the next week because them are written like "monday" and not like "day/month".
The workaround was to replace the 'weekday name' with 'day/month'.
My FB locale is italian so I replaced sabato (Saturday) with 10/8, domenica (Sunday) with 11/8 and so on.
I added the following dates at line 608, before
parsed_date = datetime.strptime(birthday_date_str, locale_date_format_mapping[user_locale])
Here is the code, simple but working:
The text was updated successfully, but these errors were encountered: