pnp / List-Formatting

List Formatting Samples for use in SharePoint and Microsoft Lists
https://pnp.github.io/List-Formatting/
MIT License
1.71k stars 824 forks source link

Hightlight rows current weekday #619

Closed 365knoten closed 1 year ago

365knoten commented 1 year ago
Q A
Bug fix? no
New sample? yes
Related issues? no

What's in this Pull Request?

This is a new sample that demonstrates how to apply formatting to list columns based on the current day of the week. So the same view is formatted differently on a Sunday than on a Wednesday.

tecchan1107 commented 1 year ago

Hi @365knoten . Thanks for the great sample!! I tested the sample at my place and the day of the week was different depending on the current time, even on the same day.

image

image

This is probably an effect of my computer being set to Japan time(UTC+09:00).

I am sorry, but could you please confirm this phenomenon?

tecchan1107 commented 1 year ago

Thank you for the update @365knoten 🙏✨ I'll test it again on my end!

365knoten commented 1 year ago

Thank you for testing @tecchan1107 .

I did not take different timezones into account, but tested the new formula with many different timezones yesterday.

Kind Regards, Sven

tecchan1107 commented 1 year ago

Hi @365knoten ! I tested it and it successfully highlighted the today's day of the week row! Thanks for the fix, and for the great, great sample😍😍😍✨

I have done the merge, please check the following link. (I made some minor adjustments when merging.) https://github.com/pnp/List-Formatting/tree/master/view-samples/highlight-rows-current-weekday

Please let me know if you have any questions.

Once again, thanks for the awesome sample! I learned a lot about the math of the days of the week🤩!

tecchan1107 commented 1 year ago

If you are interested, please register for the recognition program at the following link. You will receive a digital badge when you register! http://aka.ms/m365pnp-recognition