Current day of the week in an ellipse.

Hi, how do I make sure that the current day of the week is displayed in an ellipse? 

Has anyone handled something like this?

Thank you.
  • I'm sorry, David, I interrupted you on vacation.
    
    Thanks for the sample code, now it's up to me.
    
    When I imported the code and spultil the simulator, my days did not shift and it is still only in one place.
    
    Do you know why?
    
    Have a nice holiday ...
  • Did it print all the days of the week and print an ellipse around TUE?

    If not, you're not running it.  Check your run configuration in Eclipse IDE and make sure you're definitely running ExampleDaysOfWeek. I ran it on the vivoactive 3 music, but enabled it for every watch.

    Let me know if you still can't get it to run. It looks like:  

  • 1) it printed all days, but it did not print the ellipse for the current day (Tuesday)

    2) I need to display this for Garmin F6




    EDIT:
    in the simulator it doesn't work for me even for garmin vivo active 3 music.

  • Is your computer definitely on Tuesday ;) ?

    Please add the two lines below to the code at line 48.

     var dayOfWeek=clockTime.day_of_week.substring(0,3).toUpper();
            
    System.println("date:" + clockTime.day + "/" + clockTime.month + "/" + clockTime.year);
    System.println("dayOfWeek:" + dayOfWeek);

    It should print:

    date:14/Sep/2021
    dayOfWeek:TUE

    over and over

  • Thinking about it...is it possible that your watch is in a different language? That would explain why it doesn't work and will require a slightly different solution.

  • Yes, my day is Tuesday, but the problem with printing will probably be that I use the language for drawing of the day CZ and not ENG. Is there any way I can draw days in the system language?
    
    Thank you.



  • Yes, my language is CZ, please include in Gregorian.info ()?
  • It's a little tricky, but please try the new version at the link. This works out the names of the days for your local language and then circles the correct one

    It's not completely trivial to do. It works it out by taking a known Monday (3rd Jan 2000) and printing the day of the week for that, and then the following 6 days.

    Once it's done this, it works out the name of today and circles the right day of the week.

    This appears to work in all the languages I tried.

    Let me know if this works for you.

  • If you use Gregorian.info with FORMAT_MEDIUM or FORMAT_LONG, you get it in the language selected on a device.  Only a small number of languages can be seen in the sim.  Try it on a real device.