Linux Calendar: verschil tussen versies

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
(Nieuwe pagina aangemaakt met 'Rechtsonder in de ''system tray'' (toch?) heb je meestal datum + tijd. Dat kun je aanpassen. Ik wil graag weeknumers en secondes toevoegen. == Codes == %a - The a...')
 
 
(15 tussenliggende versies door dezelfde gebruiker niet weergegeven)
Regel 1: Regel 1:
 
Rechtsonder in de ''system tray'' (toch?) heb je meestal datum + tijd. Dat kun je aanpassen. Ik wil graag weeknumers en secondes toevoegen.
 
Rechtsonder in de ''system tray'' (toch?) heb je meestal datum + tijd. Dat kun je aanpassen. Ik wil graag weeknumers en secondes toevoegen.
 +
 +
Daarnaast kun je dit toepassen voor de screensaver.
  
 
== Codes ==
 
== Codes ==
  
%a - The abbreviated weekday name (Sun)
+
Dit zijn vermoedelijk Python-codes. Linux Calendar-codes lijken niet altijd precies overeen te komen. Oa. weeknummers werken niet goed. Of misschien dat ik daarvoor eerst locale-instellingen op de betreffende computer goed moet instellen?
%A - The full weekday name (Sunday)
+
 
 +
<pre>
 +
%a - Dag van de week, afgekort  (Sat)
 +
%A - Dag van de week, uitgeschreven (Saturday)
 +
 
 
%b - The abbreviated month name (Jan)
 
%b - The abbreviated month name (Jan)
 
%B - The full month name (January)
 
%B - The full month name (January)
Regel 17: Regel 23:
 
%p - Meridian indicator (AM or PM)
 
%p - Meridian indicator (AM or PM)
 
%S - Second of the minute (00..60)
 
%S - Second of the minute (00..60)
%w - Day of the week (Sunday is 0, 0..6)
+
 
%y - Year without a century (00..99)
+
%u - Dit lijkt het dag-van-de-weeknummer te geven zonder voorloop-    6
 +
    nul (mei 2018, Linux Mint). Onduidelijk of telling bij maan-
 +
    dag of zondag begint, en of het begint bij 0 of bij 1
 +
 
 +
%U - Week number of the year (Sunday as the first day of the week)  39
 +
    as a zero padded decimal number. All days in a new year pre-
 +
    ceding the first Sunday are considered to be in week 0 -
 +
    In mei 2018 op Linux Mint, gaf dit een foutmelding
 +
 
 +
%V  ISO-8601:1988 week number of the given year, starting with the  19
 +
    first week of the year with at least 4 weekdays, with Monday
 +
    being the start of the week 01 through 53 (where 53 accounts
 +
    for an overlapping week)
 +
 
 +
%w  Dag-van-de-weeknummer zonder voorloop-nul (Linux Mint, mei      6
 +
    2018). Onduidelijk of telling bij maandag of zondag begint,
 +
    en of het begint bij 0 of bij 1
 +
 
 +
%W - Week number of the year (Monday as the first day of the week)  39
 +
    as a decimal number. All days in a new year preceding the
 +
    first Monday are considered to be in week 0.
 +
    -- Ik krijg een foutmelding (Linux Mint, mei 2018)
 +
 
 +
%y - Year without a century                                         00-99
 
%Y - Year with century
 
%Y - Year with century
 
%Z - Time zone name
 
%Z - Time zone name
 
%% - Literal % character
 
%% - Literal % character
 +
</pre>
 +
 +
== Voorbeelden ==
  
 +
<pre>
 +
Wat?          Hoe?                          Voorbeeld
 +
------------  -----------------------      ------------------------
 +
Standaard      %A %B %e, %H:%M              Saturday May 12, 16:18
 +
Eigen format  Wk %V - %a %e, %H:%M:%S      Wk 19 - Sat 12, 16:35:57
 +
Eigen format  Wk %V - %a %e %B, %H:%M:%S    Wk 19 - Sat 12, 16:35:57
 +
Eigen format  Wk %V - %a %e %B - %H:%M:%S  Wk 19 - Sat 12 - 16:35:57
 +
</pre>
  
 
== Bronnen ==
 
== Bronnen ==
  
 
* https://www.foragoodstrftime.com/
 
* https://www.foragoodstrftime.com/
 +
* http://strftime.org/ - Sommige dingen werken niet, waaronder %W
 +
* https://stackoverflow.com/questions/33039960/strftime-with-week-number-format-yyyywww-gives-wrong-week
 +
* http://php.net/manual/en/function.strftime.php

Huidige versie van 3 jul 2020 om 12:43

Rechtsonder in de system tray (toch?) heb je meestal datum + tijd. Dat kun je aanpassen. Ik wil graag weeknumers en secondes toevoegen.

Daarnaast kun je dit toepassen voor de screensaver.

Codes

Dit zijn vermoedelijk Python-codes. Linux Calendar-codes lijken niet altijd precies overeen te komen. Oa. weeknummers werken niet goed. Of misschien dat ik daarvoor eerst locale-instellingen op de betreffende computer goed moet instellen?

%a - Dag van de week, afgekort   (Sat)
%A - Dag van de week, uitgeschreven (Saturday)

%b - The abbreviated month name (Jan)
%B - The full month name (January)
%d - Day of the month (01..31)
%e - Day of the month (1..31)
%H - Hour of the day, 24-hour clock (00..23)
%I - Hour of the day, 12-hour clock (01..12)
%l - Hour of the day ()
%j - Day of the year (001..366)
%m - Month of the year (01..12)
%M - Minute of the hour (00..59)
%p - Meridian indicator (AM or PM)
%S - Second of the minute (00..60)

%u - Dit lijkt het dag-van-de-weeknummer te geven zonder voorloop-    6
     nul (mei 2018, Linux Mint). Onduidelijk of telling bij maan-
     dag of zondag begint, en of het begint bij 0 of bij 1

%U - Week number of the year (Sunday as the first day of the week)   39 
     as a zero padded decimal number. All days in a new year pre-
     ceding the first Sunday are considered to be in week 0 - 
     In mei 2018 op Linux Mint, gaf dit een foutmelding

%V   ISO-8601:1988 week number of the given year, starting with the  19
     first week of the year with at least 4 weekdays, with Monday 
     being the start of the week 01 through 53 (where 53 accounts 
     for an overlapping week)

%w   Dag-van-de-weeknummer zonder voorloop-nul (Linux Mint, mei       6
     2018). Onduidelijk of telling bij maandag of zondag begint, 
     en of het begint bij 0 of bij 1

%W - Week number of the year (Monday as the first day of the week)   39
     as a decimal number. All days in a new year preceding the 
     first Monday are considered to be in week 0.
     -- Ik krijg een foutmelding (Linux Mint, mei 2018)

%y - Year without a century                                          00-99
%Y - Year with century
%Z - Time zone name
%% - Literal % character

Voorbeelden

Wat?           Hoe?                          Voorbeeld
------------   -----------------------       ------------------------
Standaard      %A %B %e, %H:%M               Saturday May 12, 16:18
Eigen format   Wk %V - %a %e, %H:%M:%S       Wk 19 - Sat 12, 16:35:57
Eigen format   Wk %V - %a %e %B, %H:%M:%S    Wk 19 - Sat 12, 16:35:57
Eigen format   Wk %V - %a %e %B - %H:%M:%S   Wk 19 - Sat 12 - 16:35:57

Bronnen