Number weeks from datepicker

Witam
Po wyborze datepicker w labelu był numer tygodnia roku.
Proszę o pomoc
Dziękuje

One way

Another using clock component

1 Like

To return the week number:

See here for formats:
https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

This is also a method for calculating the week number of the date.

Here are the results.

image

From Week Numbers for 2022

18 ?

17 ?

image

:wink:

I must be in an alternate universe today :slight_smile:

2 Likes

My real phone reports 17.

:question:

Companion reports 18 :slight_smile:

Not for me.

I also get 17 on my real phone. But my Memu emulator gets 18.

Blocks used

Tested as apk on Xiaomi Mi A1 - week 18. Same result tested with companion

No, not that emulator, the Memu Play emulator.

MIT Companion, "Do It Result", Installed always 17. Xiaomi.

I have no idea what your problems are. :upside_down_face:
I've tried it on multiple devices and Android versions. Result of course always: 17.

Then I live in a parallel universe :rofl: Will test later with other phones...

...

sometimes 17, sometimes 18. Even Google does not have a correct answer.

Result number 1:

image

Result number 2:

Is today week number 16, 17 or 18? I guess we'll never know...