Today is the CenterMinecraft MirroredThe Work Day CountdownTips for golfing in 05AB1EConvert calendar dates to week dates and vice versaWhat date is that again?Combined 100 year birthdayHow many weeks?Beat Pure Regular Expressions at Validating ISO 8601 DatesToday in the YOLDHappy New Year 0409!Count the timespansASCII Calendar PlannerGet the date of the nth day of week in a given year and month

A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?

Patience, young "Padovan"

Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?

How is this relation reflexive?

Why are only specific transaction types accepted into the mempool?

Is there a familial term for apples and pears?

What typically incentivizes a professor to change jobs to a lower ranking university?

Can I make popcorn with any corn?

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?

Work Breakdown with Tikz

How to type dʒ symbol (IPA) on Mac?

Why has Russell's definition of numbers using equivalence classes been finally abandoned? ( If it has actually been abandoned).

Can I interfere when another PC is about to be attacked?

A Journey Through Space and Time

whey we use polarized capacitor?

Is it possible to make sharp wind that can cut stuff from afar?

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

Validation accuracy vs Testing accuracy

What would happen to a modern skyscraper if it rains micro blackholes?

DOS, create pipe for stdin/stdout of command.com(or 4dos.com) in C or Batch?

A function which translates a sentence to title-case

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?

What makes Graph invariants so useful/important?



Today is the Center


Minecraft MirroredThe Work Day CountdownTips for golfing in 05AB1EConvert calendar dates to week dates and vice versaWhat date is that again?Combined 100 year birthdayHow many weeks?Beat Pure Regular Expressions at Validating ISO 8601 DatesToday in the YOLDHappy New Year 0409!Count the timespansASCII Calendar PlannerGet the date of the nth day of week in a given year and month













32












$begingroup$


Given a date as input in any convenient format, output a calendar with that date as the exact center of a five-week window. The header of the calendar must include the two-letter abbreviations for the days of the week (i.e., Su Mo Tu We Th Fr Sa). Three-letter or other abbreviations of the days are not allowed.



For example, given April 2 2019 as input, the output should be



Sa Su Mo Tu We Th Fr
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19


so that the given date is the exact middle of the calendar.



Given February 19 2020, output



Su Mo Tu We Th Fr Sa
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
1 2 3 4 5 6 7


For September 14 1752, show the following:



Mo Tu We Th Fr Sa Su
28 29 30 31 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 1



  • Input and output can be given by any convenient method.

  • The input is guaranteed non-empty and valid (i.e., you'll never receive "" or Feb 31 etc.).

  • Assume Gregorian calendar for all dates.

  • Leap years must be accounted for.

  • Input dates will range from Jan 1 1600 to Dec 31 2500.

  • You can print it to STDOUT or return it as a function result.

  • Either a full program or a function are acceptable.

  • Any amount of extraneous whitespace is acceptable, so long as the characters line up appropriately.

  • Leading zeros on the single-digit days are allowed, as are aligning the single-digit days to be left-aligned instead.


  • Standard loopholes are forbidden.

  • This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.









share|improve this question











$endgroup$
















    32












    $begingroup$


    Given a date as input in any convenient format, output a calendar with that date as the exact center of a five-week window. The header of the calendar must include the two-letter abbreviations for the days of the week (i.e., Su Mo Tu We Th Fr Sa). Three-letter or other abbreviations of the days are not allowed.



    For example, given April 2 2019 as input, the output should be



    Sa Su Mo Tu We Th Fr
    16 17 18 19 20 21 22
    23 24 25 26 27 28 29
    30 31 1 2 3 4 5
    6 7 8 9 10 11 12
    13 14 15 16 17 18 19


    so that the given date is the exact middle of the calendar.



    Given February 19 2020, output



    Su Mo Tu We Th Fr Sa
    2 3 4 5 6 7 8
    9 10 11 12 13 14 15
    16 17 18 19 20 21 22
    23 24 25 26 27 28 29
    1 2 3 4 5 6 7


    For September 14 1752, show the following:



    Mo Tu We Th Fr Sa Su
    28 29 30 31 1 2 3
    4 5 6 7 8 9 10
    11 12 13 14 15 16 17
    18 19 20 21 22 23 24
    25 26 27 28 29 30 1



    • Input and output can be given by any convenient method.

    • The input is guaranteed non-empty and valid (i.e., you'll never receive "" or Feb 31 etc.).

    • Assume Gregorian calendar for all dates.

    • Leap years must be accounted for.

    • Input dates will range from Jan 1 1600 to Dec 31 2500.

    • You can print it to STDOUT or return it as a function result.

    • Either a full program or a function are acceptable.

    • Any amount of extraneous whitespace is acceptable, so long as the characters line up appropriately.

    • Leading zeros on the single-digit days are allowed, as are aligning the single-digit days to be left-aligned instead.


    • Standard loopholes are forbidden.

    • This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.









    share|improve this question











    $endgroup$














      32












      32








      32


      1



      $begingroup$


      Given a date as input in any convenient format, output a calendar with that date as the exact center of a five-week window. The header of the calendar must include the two-letter abbreviations for the days of the week (i.e., Su Mo Tu We Th Fr Sa). Three-letter or other abbreviations of the days are not allowed.



      For example, given April 2 2019 as input, the output should be



      Sa Su Mo Tu We Th Fr
      16 17 18 19 20 21 22
      23 24 25 26 27 28 29
      30 31 1 2 3 4 5
      6 7 8 9 10 11 12
      13 14 15 16 17 18 19


      so that the given date is the exact middle of the calendar.



      Given February 19 2020, output



      Su Mo Tu We Th Fr Sa
      2 3 4 5 6 7 8
      9 10 11 12 13 14 15
      16 17 18 19 20 21 22
      23 24 25 26 27 28 29
      1 2 3 4 5 6 7


      For September 14 1752, show the following:



      Mo Tu We Th Fr Sa Su
      28 29 30 31 1 2 3
      4 5 6 7 8 9 10
      11 12 13 14 15 16 17
      18 19 20 21 22 23 24
      25 26 27 28 29 30 1



      • Input and output can be given by any convenient method.

      • The input is guaranteed non-empty and valid (i.e., you'll never receive "" or Feb 31 etc.).

      • Assume Gregorian calendar for all dates.

      • Leap years must be accounted for.

      • Input dates will range from Jan 1 1600 to Dec 31 2500.

      • You can print it to STDOUT or return it as a function result.

      • Either a full program or a function are acceptable.

      • Any amount of extraneous whitespace is acceptable, so long as the characters line up appropriately.

      • Leading zeros on the single-digit days are allowed, as are aligning the single-digit days to be left-aligned instead.


      • Standard loopholes are forbidden.

      • This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.









      share|improve this question











      $endgroup$




      Given a date as input in any convenient format, output a calendar with that date as the exact center of a five-week window. The header of the calendar must include the two-letter abbreviations for the days of the week (i.e., Su Mo Tu We Th Fr Sa). Three-letter or other abbreviations of the days are not allowed.



      For example, given April 2 2019 as input, the output should be



      Sa Su Mo Tu We Th Fr
      16 17 18 19 20 21 22
      23 24 25 26 27 28 29
      30 31 1 2 3 4 5
      6 7 8 9 10 11 12
      13 14 15 16 17 18 19


      so that the given date is the exact middle of the calendar.



      Given February 19 2020, output



      Su Mo Tu We Th Fr Sa
      2 3 4 5 6 7 8
      9 10 11 12 13 14 15
      16 17 18 19 20 21 22
      23 24 25 26 27 28 29
      1 2 3 4 5 6 7


      For September 14 1752, show the following:



      Mo Tu We Th Fr Sa Su
      28 29 30 31 1 2 3
      4 5 6 7 8 9 10
      11 12 13 14 15 16 17
      18 19 20 21 22 23 24
      25 26 27 28 29 30 1



      • Input and output can be given by any convenient method.

      • The input is guaranteed non-empty and valid (i.e., you'll never receive "" or Feb 31 etc.).

      • Assume Gregorian calendar for all dates.

      • Leap years must be accounted for.

      • Input dates will range from Jan 1 1600 to Dec 31 2500.

      • You can print it to STDOUT or return it as a function result.

      • Either a full program or a function are acceptable.

      • Any amount of extraneous whitespace is acceptable, so long as the characters line up appropriately.

      • Leading zeros on the single-digit days are allowed, as are aligning the single-digit days to be left-aligned instead.


      • Standard loopholes are forbidden.

      • This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.






      code-golf string ascii-art date






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 days ago







      AdmBorkBork

















      asked Apr 4 at 19:13









      AdmBorkBorkAdmBorkBork

      27.8k467239




      27.8k467239




















          13 Answers
          13






          active

          oldest

          votes


















          11












          $begingroup$


          R, 77 72 bytes





          function(d,`~`=format)write(c(strtrim(d+-3:3~"%a",2),d+-17:17~"%e"),1,7)


          Try it online!



          Fixed output to use 2 letter day abbreviations.



          -1 byte using strtrim thanks to Aaron Hayman.



          Pads date numbers with leading 0s; takes input as a Date, which can be created by using as.Date("YYYY/MM/DD").



          Weirdly short for an R ascii-art answer...






          share|improve this answer











          $endgroup$




















            6












            $begingroup$


            05AB1E, 175 174 172 171 160 bytes



            ¦WΘ1š-1šVтFY`2ô0Kθ4ÖUD2Qi28X+ë<7%É31α}‹iY¬>0ëY1¾ǝDÅsD12‹i>1ë1Dǝ¤>2}}ǝVY})DJIJk18+£35.£¬.•4ιõ÷‡o‹ƶ¸•2ôs`UÐ3‹12*+>13*5÷s3‹Xα©т%D4÷®т÷©4÷®·()DćsćsO7%._s€нT‰J«7ô»


            Input in the format [day, month, year]. Output with leading 0s for single-digit days, and lowercase mo through su (+1 byte can be added if titlecase is mandatory).



            Try it online or verify all test cases.



            Holy shit.. This might be my new record for longest 05AB1E answer, and then I include some very complex ascii-art challenges I did... >.> EDIT: Hmm ok, almost.. ;p



            Important note: 05AB1E doesn't have any builtins for Date objects or calculations. The only builtin regarding dates it has is today's year/month/day/hours/minutes/seconds/microseconds.



            So because of that, almost all of the code you see are manual calculations to calculated the previous and next days (including transition over years and keeping in mind the leap years), and calculating the day of the week by using Zeller's congruence.



            Huge parts of the code are copied from this earlier 05AB1E answer of mine, which will also be relevant for the explanation below.



            Explanation:



            We start by going to the first day of the previous month:





            ¦ # Remove the first item (the days) from the (implicit) input
            W # Get the minimum (without popping the list itself)
            # (since the year is guaranteed to be above 1599, this is the month)
            Θ # Check if its exactly 1 (1 if 1, 0 if in the range [2,31])
            1š # Prepend a 1 as list (so we now have either [1,1] or [1,0]
            - # Subtract this from the month and year
            1š # And prepend a 1 for the day
            V # Pop and store this first day of the previous month in variable `Y`


            Then I use that date as start date, and calculate the next 100 days:



            тF # Loop 100 times:
            Y`2ô0Kθ4ÖUD2Qi28X+ë<7%É31α}‹iY¬>0ëY1¾ǝDÅsD12‹i>1ë1Dǝ¤>2}}ǝV
            # Calculate the next day in line
            # (see the linked challenge above for a detailed explanation of this)
            Y # And leave it on the stack
            }) # After the loop: wrap the entire stack into a list, which contains our 100 days


            Then, with the input-date as the middle, I only leave the 17 before and 17 after that input-date from the list:



            DJ # Duplicate the 100 dates, and join the day/month/year together to strings
            IJ # Push the input, also joined together
            k # Get the 0-based index of the input in this list
            # (the joins are necessary, because indexing doesn't work for 2D lists)
            18+ # Add 18 to this index (18 instead of 17, because the index is 0-based)
            £ # Only leave the first index+18 items from the 100 dates
            35.£ # Then only leave the last 35 items


            Now we have our 35 days. Next step is to calculate the day of the week, and create the header of the output-table:



            ¬ # Get the first date of the list (without popping the list itself)
            .•4ιõ÷‡o‹ƶ¸• # Push compressed string "sasumotuwethfr"
            2ô # Split it into chunks of size 2
            s # Swap to get the first date again
            `UÐ3‹12*+>13*5÷s3‹Xα©т%D4÷®т÷©4÷®·()DćsćsO7%
            # Calculate the day of the week (sa=0; su=1; ...; fr=6)
            # (see the linked challenge above for a detailed explanation of this)
            ._ # Rotate the list of strings that many times


            See this 05AB1E tip of mine (section How to compress strings not part of the dictionary?) to understand why .•4ιõ÷‡o‹ƶ¸• is "sasumotuwethfr".



            Then we create the days to fill the table itself based on our earlier created list of dates. Which we'll merge together with the header. After which we can print the final result:



            s # Swap to get the list of dates again
            €н # Only leave the first item of each date (the days)
            T‰ # Take the divmod 10 of each
            J # Join those divmod results together
            # (we now have leading 0s for single-digit days)
            « # Merge this list together with the header list
            7ô # Split it into chunks of size 7
            » # Join each inner list by spaces, and then each string by newlines
            # (and output the result implicitly)





            share|improve this answer











            $endgroup$








            • 2




              $begingroup$
              That's a huge amount of work!
              $endgroup$
              – Luis Mendo
              2 days ago






            • 2




              $begingroup$
              Yeah, Java beats 05AB1E! :D First time ever, I guess ;-)
              $endgroup$
              – Olivier Grégoire
              2 days ago










            • $begingroup$
              @LuisMendo Most was done last time with the linked challenge, but yes, it was a lot of work.. ;) Explanation has been added btw.
              $endgroup$
              – Kevin Cruijssen
              2 days ago










            • $begingroup$
              @OlivierGrégoire Now we're the same bye-count. ;)
              $endgroup$
              – Kevin Cruijssen
              2 days ago










            • $begingroup$
              @OlivierGrégoire And now it's lower again, sorry. ;p
              $endgroup$
              – Kevin Cruijssen
              2 days ago


















            5












            $begingroup$

            JavaScript (ES6),  141  126 bytes



            Saved 15 bytes by borrowing .toUTCString().slice(0,2) from Neil's answer



            Takes input as a Date object.





            f=(d,n=0)=>n<42?(D=new Date(d-864e5*(24-n)),n<7?D.toUTCString().slice(0,2):(i=D.getDate())>9?i:' '+i)+`
            `[++n%7&&1]+f(d,n):''


            Try it online!






            share|improve this answer











            $endgroup$












            • $begingroup$
              Huh, I could have sworn that my code failed for the third test case when I originally wrote it... well that saves me 52 bytes...
              $endgroup$
              – Neil
              yesterday


















            4












            $begingroup$


            JavaScript (Node.js), 205 152 145 bytes








            f=
            d=>`012345`.replace(g=/./g,r=>`0123456
            `.replace(g,c=>`$new Date(d-864e5*(24-c-r*7))[+r?`getUTCDate`:`toUTCString`]()`.slice(0,2).padStart(3)))

            <input type=date oninput=o.textContent=f(this.valueAsDate)><pre id=o>





            Try it online! Takes input as JavaScript Date object or timestamp. Edit: Saved 1 byte thanks to @EmbodimentofIgnorance, which then allowed me to save a further 7 bytes by adding a trailing newline to the output. Saved 52 bytes when I discovered that I was working around behaviour that was not actually buggy in the first place...






            share|improve this answer











            $endgroup$












            • $begingroup$
              padStart(2) -> padStart(3), remove the space in the join string for -1 byte
              $endgroup$
              – Embodiment of Ignorance
              Apr 4 at 22:37



















            3












            $begingroup$


            C# (Visual C# Interactive Compiler), 124 120 bytes





            n=>for(int i=0;i<42;)Write($"(i<7?$"n.AddDays(i-3):ddd".Remove(2,1):n.AddDays(i-24).Day+""),3"+(++i%7<1?"n":""));


            Try it online!






            share|improve this answer











            $endgroup$




















              2












              $begingroup$


              Wolfram Language (Mathematica), 123 bytes



              (s=#;Grid@Join[StringTake[ToString@DayName[s~d~#]&/@Range[-3,3],2],Partition[Last@d[s,#]&/@Range[-17,17],7]])&
              d=DatePlus


              Try it online!



              I don't know why Grid doesn't work on TIO but this code outputs this



              enter image description here



              @DavidC saved 1 byte






              share|improve this answer











              $endgroup$












              • $begingroup$
                Maybe Grid doesn't work because TIO can't center the items like in your picture?
                $endgroup$
                – AdmBorkBork
                2 days ago










              • $begingroup$
                @AdmBorkBork There is a way to load graphics like this in TIO. Someone had shown me last year I think. But i can't remember how to do it... So if anyone knows, let us know!
                $endgroup$
                – J42161217
                2 days ago


















              2












              $begingroup$


              Perl 6, 87 bytes





              comb 21,($_-17..$_+17)>>.day.fmt('%2d')


              Try it online!



              Takes a Date object, returns a list of lines.






              share|improve this answer











              $endgroup$




















                2












                $begingroup$


                MATL, 34 33 31 bytes



                YO-17:17+t7:)8XOO3Z(!1ew7XOU7e!


                Try it online!



                Explanation



                YO % Implicit input. Convert to date number. This is a single number
                % that specifies the date
                -17:17 % Push [-17 -16 ... 16 17]
                + % Add to date number, element-wise. This gives a row vector of 35
                % date numbers centered around the input date
                t % Duplicate
                7: % Push [1 2 ... 7]
                ) % Index into the 35-element vector. This keeps the first 7 entries
                8XO % Convert to day-of-week in 3 letters. Gives a 3-col char matrix
                O3Z( % Write char 0 (equivalent to space for display purposes) into the
                % 3rd column
                !1e % Tranpose and linearize into a row. This produces a string such as
                % 'Tu We Th Fr Sa Su Mo ', to be used as column headings
                w % Swap. This brings to top the row vector of 35 date numbers
                % computed from the input
                7XO % Convert to day-of-month. Gives a 2-col char matrix
                U % Convert each row to number
                7e! % Reshape into 7-row matrix and transpose
                % Implicit display. This prints the string with the headings and
                % the matrix. The latter has a minimum-one-space separation between
                % columns, so it is aligned with the headings





                share|improve this answer











                $endgroup$




















                  2












                  $begingroup$


                  Java (JDK), 149 bytes





                  d->d.add(5,-24);for(int i=0,w;i<42;d.add(5,1))System.out.printf("%c%2s",i%7<1?10:32,i++<7?"SaSuMoTuWeThFr".substring(w=d.get(7)%7*2,w+2):d.get(5));


                  Try it online!



                  Credits



                  • -13 bytes thanks to Kevin Cruijssen.





                  share|improve this answer











                  $endgroup$








                  • 1




                    $begingroup$
                    159 bytes
                    $endgroup$
                    – Kevin Cruijssen
                    2 days ago






                  • 1




                    $begingroup$
                    @KevinCruijssen Wait... what? I congratulate you! I tried to do this, but couldn't find a way to do it, and yet you did it! Very nice :-)
                    $endgroup$
                    – Olivier Grégoire
                    2 days ago







                  • 1




                    $begingroup$
                    Maybe you see something more to combine the i and j somehow? Or something shorter for j++%7<1?10:32 with some bitwise magic? But I'll leave that to you. I'm going back to work, lol. ;)
                    $endgroup$
                    – Kevin Cruijssen
                    2 days ago







                  • 1




                    $begingroup$
                    Ah, of course.. Nice teamwork! ;) PS: Where does the w stand for? Why not h for header?
                    $endgroup$
                    – Kevin Cruijssen
                    2 days ago






                  • 1




                    $begingroup$
                    @KevinCruijssen w for "day of week". Also, bit twiddling can only lead to (i%7+6)/7*22+10 which is much longer.
                    $endgroup$
                    – Olivier Grégoire
                    2 days ago



















                  2












                  $begingroup$


                  PHP, 197 189 187 bytes



                  for($d=date_create($argn)->sub($i=new DateInterval(P17D)),$i->d=1;$x++<35;$h.=$x<8?substr($d->format(D),0,2).' ':'',$d->add($i))$o.=str_pad($d->format(j),3,' ',2);echo wordwrap($h.$o,20);


                  Try it online!



                  Input is STDIN as a date string. Run with php -nF.



                  $ echo April 2 2019|php -nF cal.php

                  Sa Su Mo Tu We Th Fr
                  16 17 18 19 20 21 22
                  23 24 25 26 27 28 29
                  30 31 1 2 3 4 5
                  6 7 8 9 10 11 12
                  13 14 15 16 17 18 19


                  Verify all test cases



                  Or 174 bytes with zero-padded single digits.






                  share|improve this answer











                  $endgroup$




















                    0












                    $begingroup$


                    Red, 153 131 bytes



                    func[d][s: d - 24 loop 7[prin[""copy/part system/locale/days/(s/10) 2]s:
                    s + 1]loop 5[print""loop 7[prin pad/left s/4 3 s: s + 1]]]


                    Try it online!






                    share|improve this answer











                    $endgroup$




















                      0












                      $begingroup$

                      T-SQL, 203 bytes



                      DECLARE @f date='2020-02-19'

                      ,@ char(20)=0,@d char(105)=0SELECT
                      @=left(format(d,'D'),2)+' '+@,@d=right(d,2)+char(32-n%7/6*19)+@d
                      FROM(SELECT dateadd(d,number-17,@f)d,number n
                      FROM spt_values WHERE'P'=type)x ORDER BY-n
                      PRINT @+'
                      '+@d


                      The online version is slightly different, this posted version works in MS-SQL Studio Management. It saves 1 bytes compared with the online version, but doesn't give the correct result online



                      Try it online






                      share|improve this answer











                      $endgroup$




















                        0












                        $begingroup$


                        Python 2, 115 bytes





                        from datetime import*
                        d=input()
                        for i in range(42):print(d+timedelta(i-24)).strftime('%'+'da'[i<7])[:2]+i%7/6*'n',


                        Try it online!



                        Not sure if this is allowed... takes input from STDIN in the form date(year, month, day). This can also be represented as __import__('datetime').date(year, month, day). These are really __import__('datetime').date objects.






                        share|improve this answer









                        $endgroup$













                          Your Answer





                          StackExchange.ifUsing("editor", function ()
                          return StackExchange.using("mathjaxEditing", function ()
                          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
                          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
                          );
                          );
                          , "mathjax-editing");

                          StackExchange.ifUsing("editor", function ()
                          StackExchange.using("externalEditor", function ()
                          StackExchange.using("snippets", function ()
                          StackExchange.snippets.init();
                          );
                          );
                          , "code-snippets");

                          StackExchange.ready(function()
                          var channelOptions =
                          tags: "".split(" "),
                          id: "200"
                          ;
                          initTagRenderer("".split(" "), "".split(" "), channelOptions);

                          StackExchange.using("externalEditor", function()
                          // Have to fire editor after snippets, if snippets enabled
                          if (StackExchange.settings.snippets.snippetsEnabled)
                          StackExchange.using("snippets", function()
                          createEditor();
                          );

                          else
                          createEditor();

                          );

                          function createEditor()
                          StackExchange.prepareEditor(
                          heartbeatType: 'answer',
                          autoActivateHeartbeat: false,
                          convertImagesToLinks: false,
                          noModals: true,
                          showLowRepImageUploadWarning: true,
                          reputationToPostImages: null,
                          bindNavPrevention: true,
                          postfix: "",
                          imageUploader:
                          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                          allowUrls: true
                          ,
                          onDemand: true,
                          discardSelector: ".discard-answer"
                          ,immediatelyShowMarkdownHelp:true
                          );



                          );













                          draft saved

                          draft discarded


















                          StackExchange.ready(
                          function ()
                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f182681%2ftoday-is-the-center%23new-answer', 'question_page');

                          );

                          Post as a guest















                          Required, but never shown

























                          13 Answers
                          13






                          active

                          oldest

                          votes








                          13 Answers
                          13






                          active

                          oldest

                          votes









                          active

                          oldest

                          votes






                          active

                          oldest

                          votes









                          11












                          $begingroup$


                          R, 77 72 bytes





                          function(d,`~`=format)write(c(strtrim(d+-3:3~"%a",2),d+-17:17~"%e"),1,7)


                          Try it online!



                          Fixed output to use 2 letter day abbreviations.



                          -1 byte using strtrim thanks to Aaron Hayman.



                          Pads date numbers with leading 0s; takes input as a Date, which can be created by using as.Date("YYYY/MM/DD").



                          Weirdly short for an R ascii-art answer...






                          share|improve this answer











                          $endgroup$

















                            11












                            $begingroup$


                            R, 77 72 bytes





                            function(d,`~`=format)write(c(strtrim(d+-3:3~"%a",2),d+-17:17~"%e"),1,7)


                            Try it online!



                            Fixed output to use 2 letter day abbreviations.



                            -1 byte using strtrim thanks to Aaron Hayman.



                            Pads date numbers with leading 0s; takes input as a Date, which can be created by using as.Date("YYYY/MM/DD").



                            Weirdly short for an R ascii-art answer...






                            share|improve this answer











                            $endgroup$















                              11












                              11








                              11





                              $begingroup$


                              R, 77 72 bytes





                              function(d,`~`=format)write(c(strtrim(d+-3:3~"%a",2),d+-17:17~"%e"),1,7)


                              Try it online!



                              Fixed output to use 2 letter day abbreviations.



                              -1 byte using strtrim thanks to Aaron Hayman.



                              Pads date numbers with leading 0s; takes input as a Date, which can be created by using as.Date("YYYY/MM/DD").



                              Weirdly short for an R ascii-art answer...






                              share|improve this answer











                              $endgroup$




                              R, 77 72 bytes





                              function(d,`~`=format)write(c(strtrim(d+-3:3~"%a",2),d+-17:17~"%e"),1,7)


                              Try it online!



                              Fixed output to use 2 letter day abbreviations.



                              -1 byte using strtrim thanks to Aaron Hayman.



                              Pads date numbers with leading 0s; takes input as a Date, which can be created by using as.Date("YYYY/MM/DD").



                              Weirdly short for an R ascii-art answer...







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited 2 days ago

























                              answered Apr 4 at 22:38









                              GiuseppeGiuseppe

                              17.6k31153




                              17.6k31153





















                                  6












                                  $begingroup$


                                  05AB1E, 175 174 172 171 160 bytes



                                  ¦WΘ1š-1šVтFY`2ô0Kθ4ÖUD2Qi28X+ë<7%É31α}‹iY¬>0ëY1¾ǝDÅsD12‹i>1ë1Dǝ¤>2}}ǝVY})DJIJk18+£35.£¬.•4ιõ÷‡o‹ƶ¸•2ôs`UÐ3‹12*+>13*5÷s3‹Xα©т%D4÷®т÷©4÷®·()DćsćsO7%._s€нT‰J«7ô»


                                  Input in the format [day, month, year]. Output with leading 0s for single-digit days, and lowercase mo through su (+1 byte can be added if titlecase is mandatory).



                                  Try it online or verify all test cases.



                                  Holy shit.. This might be my new record for longest 05AB1E answer, and then I include some very complex ascii-art challenges I did... >.> EDIT: Hmm ok, almost.. ;p



                                  Important note: 05AB1E doesn't have any builtins for Date objects or calculations. The only builtin regarding dates it has is today's year/month/day/hours/minutes/seconds/microseconds.



                                  So because of that, almost all of the code you see are manual calculations to calculated the previous and next days (including transition over years and keeping in mind the leap years), and calculating the day of the week by using Zeller's congruence.



                                  Huge parts of the code are copied from this earlier 05AB1E answer of mine, which will also be relevant for the explanation below.



                                  Explanation:



                                  We start by going to the first day of the previous month:





                                  ¦ # Remove the first item (the days) from the (implicit) input
                                  W # Get the minimum (without popping the list itself)
                                  # (since the year is guaranteed to be above 1599, this is the month)
                                  Θ # Check if its exactly 1 (1 if 1, 0 if in the range [2,31])
                                  1š # Prepend a 1 as list (so we now have either [1,1] or [1,0]
                                  - # Subtract this from the month and year
                                  1š # And prepend a 1 for the day
                                  V # Pop and store this first day of the previous month in variable `Y`


                                  Then I use that date as start date, and calculate the next 100 days:



                                  тF # Loop 100 times:
                                  Y`2ô0Kθ4ÖUD2Qi28X+ë<7%É31α}‹iY¬>0ëY1¾ǝDÅsD12‹i>1ë1Dǝ¤>2}}ǝV
                                  # Calculate the next day in line
                                  # (see the linked challenge above for a detailed explanation of this)
                                  Y # And leave it on the stack
                                  }) # After the loop: wrap the entire stack into a list, which contains our 100 days


                                  Then, with the input-date as the middle, I only leave the 17 before and 17 after that input-date from the list:



                                  DJ # Duplicate the 100 dates, and join the day/month/year together to strings
                                  IJ # Push the input, also joined together
                                  k # Get the 0-based index of the input in this list
                                  # (the joins are necessary, because indexing doesn't work for 2D lists)
                                  18+ # Add 18 to this index (18 instead of 17, because the index is 0-based)
                                  £ # Only leave the first index+18 items from the 100 dates
                                  35.£ # Then only leave the last 35 items


                                  Now we have our 35 days. Next step is to calculate the day of the week, and create the header of the output-table:



                                  ¬ # Get the first date of the list (without popping the list itself)
                                  .•4ιõ÷‡o‹ƶ¸• # Push compressed string "sasumotuwethfr"
                                  2ô # Split it into chunks of size 2
                                  s # Swap to get the first date again
                                  `UÐ3‹12*+>13*5÷s3‹Xα©т%D4÷®т÷©4÷®·()DćsćsO7%
                                  # Calculate the day of the week (sa=0; su=1; ...; fr=6)
                                  # (see the linked challenge above for a detailed explanation of this)
                                  ._ # Rotate the list of strings that many times


                                  See this 05AB1E tip of mine (section How to compress strings not part of the dictionary?) to understand why .•4ιõ÷‡o‹ƶ¸• is "sasumotuwethfr".



                                  Then we create the days to fill the table itself based on our earlier created list of dates. Which we'll merge together with the header. After which we can print the final result:



                                  s # Swap to get the list of dates again
                                  €н # Only leave the first item of each date (the days)
                                  T‰ # Take the divmod 10 of each
                                  J # Join those divmod results together
                                  # (we now have leading 0s for single-digit days)
                                  « # Merge this list together with the header list
                                  7ô # Split it into chunks of size 7
                                  » # Join each inner list by spaces, and then each string by newlines
                                  # (and output the result implicitly)





                                  share|improve this answer











                                  $endgroup$








                                  • 2




                                    $begingroup$
                                    That's a huge amount of work!
                                    $endgroup$
                                    – Luis Mendo
                                    2 days ago






                                  • 2




                                    $begingroup$
                                    Yeah, Java beats 05AB1E! :D First time ever, I guess ;-)
                                    $endgroup$
                                    – Olivier Grégoire
                                    2 days ago










                                  • $begingroup$
                                    @LuisMendo Most was done last time with the linked challenge, but yes, it was a lot of work.. ;) Explanation has been added btw.
                                    $endgroup$
                                    – Kevin Cruijssen
                                    2 days ago










                                  • $begingroup$
                                    @OlivierGrégoire Now we're the same bye-count. ;)
                                    $endgroup$
                                    – Kevin Cruijssen
                                    2 days ago










                                  • $begingroup$
                                    @OlivierGrégoire And now it's lower again, sorry. ;p
                                    $endgroup$
                                    – Kevin Cruijssen
                                    2 days ago















                                  6












                                  $begingroup$


                                  05AB1E, 175 174 172 171 160 bytes



                                  ¦WΘ1š-1šVтFY`2ô0Kθ4ÖUD2Qi28X+ë<7%É31α}‹iY¬>0ëY1¾ǝDÅsD12‹i>1ë1Dǝ¤>2}}ǝVY})DJIJk18+£35.£¬.•4ιõ÷‡o‹ƶ¸•2ôs`UÐ3‹12*+>13*5÷s3‹Xα©т%D4÷®т÷©4÷®·()DćsćsO7%._s€нT‰J«7ô»


                                  Input in the format [day, month, year]. Output with leading 0s for single-digit days, and lowercase mo through su (+1 byte can be added if titlecase is mandatory).



                                  Try it online or verify all test cases.



                                  Holy shit.. This might be my new record for longest 05AB1E answer, and then I include some very complex ascii-art challenges I did... >.> EDIT: Hmm ok, almost.. ;p



                                  Important note: 05AB1E doesn't have any builtins for Date objects or calculations. The only builtin regarding dates it has is today's year/month/day/hours/minutes/seconds/microseconds.



                                  So because of that, almost all of the code you see are manual calculations to calculated the previous and next days (including transition over years and keeping in mind the leap years), and calculating the day of the week by using Zeller's congruence.



                                  Huge parts of the code are copied from this earlier 05AB1E answer of mine, which will also be relevant for the explanation below.



                                  Explanation:



                                  We start by going to the first day of the previous month:





                                  ¦ # Remove the first item (the days) from the (implicit) input
                                  W # Get the minimum (without popping the list itself)
                                  # (since the year is guaranteed to be above 1599, this is the month)
                                  Θ # Check if its exactly 1 (1 if 1, 0 if in the range [2,31])
                                  1š # Prepend a 1 as list (so we now have either [1,1] or [1,0]
                                  - # Subtract this from the month and year
                                  1š # And prepend a 1 for the day
                                  V # Pop and store this first day of the previous month in variable `Y`


                                  Then I use that date as start date, and calculate the next 100 days:



                                  тF # Loop 100 times:
                                  Y`2ô0Kθ4ÖUD2Qi28X+ë<7%É31α}‹iY¬>0ëY1¾ǝDÅsD12‹i>1ë1Dǝ¤>2}}ǝV
                                  # Calculate the next day in line
                                  # (see the linked challenge above for a detailed explanation of this)
                                  Y # And leave it on the stack
                                  }) # After the loop: wrap the entire stack into a list, which contains our 100 days


                                  Then, with the input-date as the middle, I only leave the 17 before and 17 after that input-date from the list:



                                  DJ # Duplicate the 100 dates, and join the day/month/year together to strings
                                  IJ # Push the input, also joined together
                                  k # Get the 0-based index of the input in this list
                                  # (the joins are necessary, because indexing doesn't work for 2D lists)
                                  18+ # Add 18 to this index (18 instead of 17, because the index is 0-based)
                                  £ # Only leave the first index+18 items from the 100 dates
                                  35.£ # Then only leave the last 35 items


                                  Now we have our 35 days. Next step is to calculate the day of the week, and create the header of the output-table:



                                  ¬ # Get the first date of the list (without popping the list itself)
                                  .•4ιõ÷‡o‹ƶ¸• # Push compressed string "sasumotuwethfr"
                                  2ô # Split it into chunks of size 2
                                  s # Swap to get the first date again
                                  `UÐ3‹12*+>13*5÷s3‹Xα©т%D4÷®т÷©4÷®·()DćsćsO7%
                                  # Calculate the day of the week (sa=0; su=1; ...; fr=6)
                                  # (see the linked challenge above for a detailed explanation of this)
                                  ._ # Rotate the list of strings that many times


                                  See this 05AB1E tip of mine (section How to compress strings not part of the dictionary?) to understand why .•4ιõ÷‡o‹ƶ¸• is "sasumotuwethfr".



                                  Then we create the days to fill the table itself based on our earlier created list of dates. Which we'll merge together with the header. After which we can print the final result:



                                  s # Swap to get the list of dates again
                                  €н # Only leave the first item of each date (the days)
                                  T‰ # Take the divmod 10 of each
                                  J # Join those divmod results together
                                  # (we now have leading 0s for single-digit days)
                                  « # Merge this list together with the header list
                                  7ô # Split it into chunks of size 7
                                  » # Join each inner list by spaces, and then each string by newlines
                                  # (and output the result implicitly)





                                  share|improve this answer











                                  $endgroup$








                                  • 2




                                    $begingroup$
                                    That's a huge amount of work!
                                    $endgroup$
                                    – Luis Mendo
                                    2 days ago






                                  • 2




                                    $begingroup$
                                    Yeah, Java beats 05AB1E! :D First time ever, I guess ;-)
                                    $endgroup$
                                    – Olivier Grégoire
                                    2 days ago










                                  • $begingroup$
                                    @LuisMendo Most was done last time with the linked challenge, but yes, it was a lot of work.. ;) Explanation has been added btw.
                                    $endgroup$
                                    – Kevin Cruijssen
                                    2 days ago










                                  • $begingroup$
                                    @OlivierGrégoire Now we're the same bye-count. ;)
                                    $endgroup$
                                    – Kevin Cruijssen
                                    2 days ago










                                  • $begingroup$
                                    @OlivierGrégoire And now it's lower again, sorry. ;p
                                    $endgroup$
                                    – Kevin Cruijssen
                                    2 days ago













                                  6












                                  6








                                  6





                                  $begingroup$


                                  05AB1E, 175 174 172 171 160 bytes



                                  ¦WΘ1š-1šVтFY`2ô0Kθ4ÖUD2Qi28X+ë<7%É31α}‹iY¬>0ëY1¾ǝDÅsD12‹i>1ë1Dǝ¤>2}}ǝVY})DJIJk18+£35.£¬.•4ιõ÷‡o‹ƶ¸•2ôs`UÐ3‹12*+>13*5÷s3‹Xα©т%D4÷®т÷©4÷®·()DćsćsO7%._s€нT‰J«7ô»


                                  Input in the format [day, month, year]. Output with leading 0s for single-digit days, and lowercase mo through su (+1 byte can be added if titlecase is mandatory).



                                  Try it online or verify all test cases.



                                  Holy shit.. This might be my new record for longest 05AB1E answer, and then I include some very complex ascii-art challenges I did... >.> EDIT: Hmm ok, almost.. ;p



                                  Important note: 05AB1E doesn't have any builtins for Date objects or calculations. The only builtin regarding dates it has is today's year/month/day/hours/minutes/seconds/microseconds.



                                  So because of that, almost all of the code you see are manual calculations to calculated the previous and next days (including transition over years and keeping in mind the leap years), and calculating the day of the week by using Zeller's congruence.



                                  Huge parts of the code are copied from this earlier 05AB1E answer of mine, which will also be relevant for the explanation below.



                                  Explanation:



                                  We start by going to the first day of the previous month:





                                  ¦ # Remove the first item (the days) from the (implicit) input
                                  W # Get the minimum (without popping the list itself)
                                  # (since the year is guaranteed to be above 1599, this is the month)
                                  Θ # Check if its exactly 1 (1 if 1, 0 if in the range [2,31])
                                  1š # Prepend a 1 as list (so we now have either [1,1] or [1,0]
                                  - # Subtract this from the month and year
                                  1š # And prepend a 1 for the day
                                  V # Pop and store this first day of the previous month in variable `Y`


                                  Then I use that date as start date, and calculate the next 100 days:



                                  тF # Loop 100 times:
                                  Y`2ô0Kθ4ÖUD2Qi28X+ë<7%É31α}‹iY¬>0ëY1¾ǝDÅsD12‹i>1ë1Dǝ¤>2}}ǝV
                                  # Calculate the next day in line
                                  # (see the linked challenge above for a detailed explanation of this)
                                  Y # And leave it on the stack
                                  }) # After the loop: wrap the entire stack into a list, which contains our 100 days


                                  Then, with the input-date as the middle, I only leave the 17 before and 17 after that input-date from the list:



                                  DJ # Duplicate the 100 dates, and join the day/month/year together to strings
                                  IJ # Push the input, also joined together
                                  k # Get the 0-based index of the input in this list
                                  # (the joins are necessary, because indexing doesn't work for 2D lists)
                                  18+ # Add 18 to this index (18 instead of 17, because the index is 0-based)
                                  £ # Only leave the first index+18 items from the 100 dates
                                  35.£ # Then only leave the last 35 items


                                  Now we have our 35 days. Next step is to calculate the day of the week, and create the header of the output-table:



                                  ¬ # Get the first date of the list (without popping the list itself)
                                  .•4ιõ÷‡o‹ƶ¸• # Push compressed string "sasumotuwethfr"
                                  2ô # Split it into chunks of size 2
                                  s # Swap to get the first date again
                                  `UÐ3‹12*+>13*5÷s3‹Xα©т%D4÷®т÷©4÷®·()DćsćsO7%
                                  # Calculate the day of the week (sa=0; su=1; ...; fr=6)
                                  # (see the linked challenge above for a detailed explanation of this)
                                  ._ # Rotate the list of strings that many times


                                  See this 05AB1E tip of mine (section How to compress strings not part of the dictionary?) to understand why .•4ιõ÷‡o‹ƶ¸• is "sasumotuwethfr".



                                  Then we create the days to fill the table itself based on our earlier created list of dates. Which we'll merge together with the header. After which we can print the final result:



                                  s # Swap to get the list of dates again
                                  €н # Only leave the first item of each date (the days)
                                  T‰ # Take the divmod 10 of each
                                  J # Join those divmod results together
                                  # (we now have leading 0s for single-digit days)
                                  « # Merge this list together with the header list
                                  7ô # Split it into chunks of size 7
                                  » # Join each inner list by spaces, and then each string by newlines
                                  # (and output the result implicitly)





                                  share|improve this answer











                                  $endgroup$




                                  05AB1E, 175 174 172 171 160 bytes



                                  ¦WΘ1š-1šVтFY`2ô0Kθ4ÖUD2Qi28X+ë<7%É31α}‹iY¬>0ëY1¾ǝDÅsD12‹i>1ë1Dǝ¤>2}}ǝVY})DJIJk18+£35.£¬.•4ιõ÷‡o‹ƶ¸•2ôs`UÐ3‹12*+>13*5÷s3‹Xα©т%D4÷®т÷©4÷®·()DćsćsO7%._s€нT‰J«7ô»


                                  Input in the format [day, month, year]. Output with leading 0s for single-digit days, and lowercase mo through su (+1 byte can be added if titlecase is mandatory).



                                  Try it online or verify all test cases.



                                  Holy shit.. This might be my new record for longest 05AB1E answer, and then I include some very complex ascii-art challenges I did... >.> EDIT: Hmm ok, almost.. ;p



                                  Important note: 05AB1E doesn't have any builtins for Date objects or calculations. The only builtin regarding dates it has is today's year/month/day/hours/minutes/seconds/microseconds.



                                  So because of that, almost all of the code you see are manual calculations to calculated the previous and next days (including transition over years and keeping in mind the leap years), and calculating the day of the week by using Zeller's congruence.



                                  Huge parts of the code are copied from this earlier 05AB1E answer of mine, which will also be relevant for the explanation below.



                                  Explanation:



                                  We start by going to the first day of the previous month:





                                  ¦ # Remove the first item (the days) from the (implicit) input
                                  W # Get the minimum (without popping the list itself)
                                  # (since the year is guaranteed to be above 1599, this is the month)
                                  Θ # Check if its exactly 1 (1 if 1, 0 if in the range [2,31])
                                  1š # Prepend a 1 as list (so we now have either [1,1] or [1,0]
                                  - # Subtract this from the month and year
                                  1š # And prepend a 1 for the day
                                  V # Pop and store this first day of the previous month in variable `Y`


                                  Then I use that date as start date, and calculate the next 100 days:



                                  тF # Loop 100 times:
                                  Y`2ô0Kθ4ÖUD2Qi28X+ë<7%É31α}‹iY¬>0ëY1¾ǝDÅsD12‹i>1ë1Dǝ¤>2}}ǝV
                                  # Calculate the next day in line
                                  # (see the linked challenge above for a detailed explanation of this)
                                  Y # And leave it on the stack
                                  }) # After the loop: wrap the entire stack into a list, which contains our 100 days


                                  Then, with the input-date as the middle, I only leave the 17 before and 17 after that input-date from the list:



                                  DJ # Duplicate the 100 dates, and join the day/month/year together to strings
                                  IJ # Push the input, also joined together
                                  k # Get the 0-based index of the input in this list
                                  # (the joins are necessary, because indexing doesn't work for 2D lists)
                                  18+ # Add 18 to this index (18 instead of 17, because the index is 0-based)
                                  £ # Only leave the first index+18 items from the 100 dates
                                  35.£ # Then only leave the last 35 items


                                  Now we have our 35 days. Next step is to calculate the day of the week, and create the header of the output-table:



                                  ¬ # Get the first date of the list (without popping the list itself)
                                  .•4ιõ÷‡o‹ƶ¸• # Push compressed string "sasumotuwethfr"
                                  2ô # Split it into chunks of size 2
                                  s # Swap to get the first date again
                                  `UÐ3‹12*+>13*5÷s3‹Xα©т%D4÷®т÷©4÷®·()DćsćsO7%
                                  # Calculate the day of the week (sa=0; su=1; ...; fr=6)
                                  # (see the linked challenge above for a detailed explanation of this)
                                  ._ # Rotate the list of strings that many times


                                  See this 05AB1E tip of mine (section How to compress strings not part of the dictionary?) to understand why .•4ιõ÷‡o‹ƶ¸• is "sasumotuwethfr".



                                  Then we create the days to fill the table itself based on our earlier created list of dates. Which we'll merge together with the header. After which we can print the final result:



                                  s # Swap to get the list of dates again
                                  €н # Only leave the first item of each date (the days)
                                  T‰ # Take the divmod 10 of each
                                  J # Join those divmod results together
                                  # (we now have leading 0s for single-digit days)
                                  « # Merge this list together with the header list
                                  7ô # Split it into chunks of size 7
                                  » # Join each inner list by spaces, and then each string by newlines
                                  # (and output the result implicitly)






                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited 2 days ago

























                                  answered 2 days ago









                                  Kevin CruijssenKevin Cruijssen

                                  42.3k570217




                                  42.3k570217







                                  • 2




                                    $begingroup$
                                    That's a huge amount of work!
                                    $endgroup$
                                    – Luis Mendo
                                    2 days ago






                                  • 2




                                    $begingroup$
                                    Yeah, Java beats 05AB1E! :D First time ever, I guess ;-)
                                    $endgroup$
                                    – Olivier Grégoire
                                    2 days ago










                                  • $begingroup$
                                    @LuisMendo Most was done last time with the linked challenge, but yes, it was a lot of work.. ;) Explanation has been added btw.
                                    $endgroup$
                                    – Kevin Cruijssen
                                    2 days ago










                                  • $begingroup$
                                    @OlivierGrégoire Now we're the same bye-count. ;)
                                    $endgroup$
                                    – Kevin Cruijssen
                                    2 days ago










                                  • $begingroup$
                                    @OlivierGrégoire And now it's lower again, sorry. ;p
                                    $endgroup$
                                    – Kevin Cruijssen
                                    2 days ago












                                  • 2




                                    $begingroup$
                                    That's a huge amount of work!
                                    $endgroup$
                                    – Luis Mendo
                                    2 days ago






                                  • 2




                                    $begingroup$
                                    Yeah, Java beats 05AB1E! :D First time ever, I guess ;-)
                                    $endgroup$
                                    – Olivier Grégoire
                                    2 days ago










                                  • $begingroup$
                                    @LuisMendo Most was done last time with the linked challenge, but yes, it was a lot of work.. ;) Explanation has been added btw.
                                    $endgroup$
                                    – Kevin Cruijssen
                                    2 days ago










                                  • $begingroup$
                                    @OlivierGrégoire Now we're the same bye-count. ;)
                                    $endgroup$
                                    – Kevin Cruijssen
                                    2 days ago










                                  • $begingroup$
                                    @OlivierGrégoire And now it's lower again, sorry. ;p
                                    $endgroup$
                                    – Kevin Cruijssen
                                    2 days ago







                                  2




                                  2




                                  $begingroup$
                                  That's a huge amount of work!
                                  $endgroup$
                                  – Luis Mendo
                                  2 days ago




                                  $begingroup$
                                  That's a huge amount of work!
                                  $endgroup$
                                  – Luis Mendo
                                  2 days ago




                                  2




                                  2




                                  $begingroup$
                                  Yeah, Java beats 05AB1E! :D First time ever, I guess ;-)
                                  $endgroup$
                                  – Olivier Grégoire
                                  2 days ago




                                  $begingroup$
                                  Yeah, Java beats 05AB1E! :D First time ever, I guess ;-)
                                  $endgroup$
                                  – Olivier Grégoire
                                  2 days ago












                                  $begingroup$
                                  @LuisMendo Most was done last time with the linked challenge, but yes, it was a lot of work.. ;) Explanation has been added btw.
                                  $endgroup$
                                  – Kevin Cruijssen
                                  2 days ago




                                  $begingroup$
                                  @LuisMendo Most was done last time with the linked challenge, but yes, it was a lot of work.. ;) Explanation has been added btw.
                                  $endgroup$
                                  – Kevin Cruijssen
                                  2 days ago












                                  $begingroup$
                                  @OlivierGrégoire Now we're the same bye-count. ;)
                                  $endgroup$
                                  – Kevin Cruijssen
                                  2 days ago




                                  $begingroup$
                                  @OlivierGrégoire Now we're the same bye-count. ;)
                                  $endgroup$
                                  – Kevin Cruijssen
                                  2 days ago












                                  $begingroup$
                                  @OlivierGrégoire And now it's lower again, sorry. ;p
                                  $endgroup$
                                  – Kevin Cruijssen
                                  2 days ago




                                  $begingroup$
                                  @OlivierGrégoire And now it's lower again, sorry. ;p
                                  $endgroup$
                                  – Kevin Cruijssen
                                  2 days ago











                                  5












                                  $begingroup$

                                  JavaScript (ES6),  141  126 bytes



                                  Saved 15 bytes by borrowing .toUTCString().slice(0,2) from Neil's answer



                                  Takes input as a Date object.





                                  f=(d,n=0)=>n<42?(D=new Date(d-864e5*(24-n)),n<7?D.toUTCString().slice(0,2):(i=D.getDate())>9?i:' '+i)+`
                                  `[++n%7&&1]+f(d,n):''


                                  Try it online!






                                  share|improve this answer











                                  $endgroup$












                                  • $begingroup$
                                    Huh, I could have sworn that my code failed for the third test case when I originally wrote it... well that saves me 52 bytes...
                                    $endgroup$
                                    – Neil
                                    yesterday















                                  5












                                  $begingroup$

                                  JavaScript (ES6),  141  126 bytes



                                  Saved 15 bytes by borrowing .toUTCString().slice(0,2) from Neil's answer



                                  Takes input as a Date object.





                                  f=(d,n=0)=>n<42?(D=new Date(d-864e5*(24-n)),n<7?D.toUTCString().slice(0,2):(i=D.getDate())>9?i:' '+i)+`
                                  `[++n%7&&1]+f(d,n):''


                                  Try it online!






                                  share|improve this answer











                                  $endgroup$












                                  • $begingroup$
                                    Huh, I could have sworn that my code failed for the third test case when I originally wrote it... well that saves me 52 bytes...
                                    $endgroup$
                                    – Neil
                                    yesterday













                                  5












                                  5








                                  5





                                  $begingroup$

                                  JavaScript (ES6),  141  126 bytes



                                  Saved 15 bytes by borrowing .toUTCString().slice(0,2) from Neil's answer



                                  Takes input as a Date object.





                                  f=(d,n=0)=>n<42?(D=new Date(d-864e5*(24-n)),n<7?D.toUTCString().slice(0,2):(i=D.getDate())>9?i:' '+i)+`
                                  `[++n%7&&1]+f(d,n):''


                                  Try it online!






                                  share|improve this answer











                                  $endgroup$



                                  JavaScript (ES6),  141  126 bytes



                                  Saved 15 bytes by borrowing .toUTCString().slice(0,2) from Neil's answer



                                  Takes input as a Date object.





                                  f=(d,n=0)=>n<42?(D=new Date(d-864e5*(24-n)),n<7?D.toUTCString().slice(0,2):(i=D.getDate())>9?i:' '+i)+`
                                  `[++n%7&&1]+f(d,n):''


                                  Try it online!







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited Apr 4 at 23:44

























                                  answered Apr 4 at 23:35









                                  ArnauldArnauld

                                  80.5k797333




                                  80.5k797333











                                  • $begingroup$
                                    Huh, I could have sworn that my code failed for the third test case when I originally wrote it... well that saves me 52 bytes...
                                    $endgroup$
                                    – Neil
                                    yesterday
















                                  • $begingroup$
                                    Huh, I could have sworn that my code failed for the third test case when I originally wrote it... well that saves me 52 bytes...
                                    $endgroup$
                                    – Neil
                                    yesterday















                                  $begingroup$
                                  Huh, I could have sworn that my code failed for the third test case when I originally wrote it... well that saves me 52 bytes...
                                  $endgroup$
                                  – Neil
                                  yesterday




                                  $begingroup$
                                  Huh, I could have sworn that my code failed for the third test case when I originally wrote it... well that saves me 52 bytes...
                                  $endgroup$
                                  – Neil
                                  yesterday











                                  4












                                  $begingroup$


                                  JavaScript (Node.js), 205 152 145 bytes








                                  f=
                                  d=>`012345`.replace(g=/./g,r=>`0123456
                                  `.replace(g,c=>`$new Date(d-864e5*(24-c-r*7))[+r?`getUTCDate`:`toUTCString`]()`.slice(0,2).padStart(3)))

                                  <input type=date oninput=o.textContent=f(this.valueAsDate)><pre id=o>





                                  Try it online! Takes input as JavaScript Date object or timestamp. Edit: Saved 1 byte thanks to @EmbodimentofIgnorance, which then allowed me to save a further 7 bytes by adding a trailing newline to the output. Saved 52 bytes when I discovered that I was working around behaviour that was not actually buggy in the first place...






                                  share|improve this answer











                                  $endgroup$












                                  • $begingroup$
                                    padStart(2) -> padStart(3), remove the space in the join string for -1 byte
                                    $endgroup$
                                    – Embodiment of Ignorance
                                    Apr 4 at 22:37
















                                  4












                                  $begingroup$


                                  JavaScript (Node.js), 205 152 145 bytes








                                  f=
                                  d=>`012345`.replace(g=/./g,r=>`0123456
                                  `.replace(g,c=>`$new Date(d-864e5*(24-c-r*7))[+r?`getUTCDate`:`toUTCString`]()`.slice(0,2).padStart(3)))

                                  <input type=date oninput=o.textContent=f(this.valueAsDate)><pre id=o>





                                  Try it online! Takes input as JavaScript Date object or timestamp. Edit: Saved 1 byte thanks to @EmbodimentofIgnorance, which then allowed me to save a further 7 bytes by adding a trailing newline to the output. Saved 52 bytes when I discovered that I was working around behaviour that was not actually buggy in the first place...






                                  share|improve this answer











                                  $endgroup$












                                  • $begingroup$
                                    padStart(2) -> padStart(3), remove the space in the join string for -1 byte
                                    $endgroup$
                                    – Embodiment of Ignorance
                                    Apr 4 at 22:37














                                  4












                                  4








                                  4





                                  $begingroup$


                                  JavaScript (Node.js), 205 152 145 bytes








                                  f=
                                  d=>`012345`.replace(g=/./g,r=>`0123456
                                  `.replace(g,c=>`$new Date(d-864e5*(24-c-r*7))[+r?`getUTCDate`:`toUTCString`]()`.slice(0,2).padStart(3)))

                                  <input type=date oninput=o.textContent=f(this.valueAsDate)><pre id=o>





                                  Try it online! Takes input as JavaScript Date object or timestamp. Edit: Saved 1 byte thanks to @EmbodimentofIgnorance, which then allowed me to save a further 7 bytes by adding a trailing newline to the output. Saved 52 bytes when I discovered that I was working around behaviour that was not actually buggy in the first place...






                                  share|improve this answer











                                  $endgroup$




                                  JavaScript (Node.js), 205 152 145 bytes








                                  f=
                                  d=>`012345`.replace(g=/./g,r=>`0123456
                                  `.replace(g,c=>`$new Date(d-864e5*(24-c-r*7))[+r?`getUTCDate`:`toUTCString`]()`.slice(0,2).padStart(3)))

                                  <input type=date oninput=o.textContent=f(this.valueAsDate)><pre id=o>





                                  Try it online! Takes input as JavaScript Date object or timestamp. Edit: Saved 1 byte thanks to @EmbodimentofIgnorance, which then allowed me to save a further 7 bytes by adding a trailing newline to the output. Saved 52 bytes when I discovered that I was working around behaviour that was not actually buggy in the first place...






                                  f=
                                  d=>`012345`.replace(g=/./g,r=>`0123456
                                  `.replace(g,c=>`$new Date(d-864e5*(24-c-r*7))[+r?`getUTCDate`:`toUTCString`]()`.slice(0,2).padStart(3)))

                                  <input type=date oninput=o.textContent=f(this.valueAsDate)><pre id=o>





                                  f=
                                  d=>`012345`.replace(g=/./g,r=>`0123456
                                  `.replace(g,c=>`$new Date(d-864e5*(24-c-r*7))[+r?`getUTCDate`:`toUTCString`]()`.slice(0,2).padStart(3)))

                                  <input type=date oninput=o.textContent=f(this.valueAsDate)><pre id=o>






                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited yesterday

























                                  answered Apr 4 at 22:26









                                  NeilNeil

                                  82.6k745179




                                  82.6k745179











                                  • $begingroup$
                                    padStart(2) -> padStart(3), remove the space in the join string for -1 byte
                                    $endgroup$
                                    – Embodiment of Ignorance
                                    Apr 4 at 22:37

















                                  • $begingroup$
                                    padStart(2) -> padStart(3), remove the space in the join string for -1 byte
                                    $endgroup$
                                    – Embodiment of Ignorance
                                    Apr 4 at 22:37
















                                  $begingroup$
                                  padStart(2) -> padStart(3), remove the space in the join string for -1 byte
                                  $endgroup$
                                  – Embodiment of Ignorance
                                  Apr 4 at 22:37





                                  $begingroup$
                                  padStart(2) -> padStart(3), remove the space in the join string for -1 byte
                                  $endgroup$
                                  – Embodiment of Ignorance
                                  Apr 4 at 22:37












                                  3












                                  $begingroup$


                                  C# (Visual C# Interactive Compiler), 124 120 bytes





                                  n=>for(int i=0;i<42;)Write($"(i<7?$"n.AddDays(i-3):ddd".Remove(2,1):n.AddDays(i-24).Day+""),3"+(++i%7<1?"n":""));


                                  Try it online!






                                  share|improve this answer











                                  $endgroup$

















                                    3












                                    $begingroup$


                                    C# (Visual C# Interactive Compiler), 124 120 bytes





                                    n=>for(int i=0;i<42;)Write($"(i<7?$"n.AddDays(i-3):ddd".Remove(2,1):n.AddDays(i-24).Day+""),3"+(++i%7<1?"n":""));


                                    Try it online!






                                    share|improve this answer











                                    $endgroup$















                                      3












                                      3








                                      3





                                      $begingroup$


                                      C# (Visual C# Interactive Compiler), 124 120 bytes





                                      n=>for(int i=0;i<42;)Write($"(i<7?$"n.AddDays(i-3):ddd".Remove(2,1):n.AddDays(i-24).Day+""),3"+(++i%7<1?"n":""));


                                      Try it online!






                                      share|improve this answer











                                      $endgroup$




                                      C# (Visual C# Interactive Compiler), 124 120 bytes





                                      n=>for(int i=0;i<42;)Write($"(i<7?$"n.AddDays(i-3):ddd".Remove(2,1):n.AddDays(i-24).Day+""),3"+(++i%7<1?"n":""));


                                      Try it online!







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited 2 days ago

























                                      answered Apr 4 at 20:56









                                      Embodiment of IgnoranceEmbodiment of Ignorance

                                      2,818127




                                      2,818127





















                                          2












                                          $begingroup$


                                          Wolfram Language (Mathematica), 123 bytes



                                          (s=#;Grid@Join[StringTake[ToString@DayName[s~d~#]&/@Range[-3,3],2],Partition[Last@d[s,#]&/@Range[-17,17],7]])&
                                          d=DatePlus


                                          Try it online!



                                          I don't know why Grid doesn't work on TIO but this code outputs this



                                          enter image description here



                                          @DavidC saved 1 byte






                                          share|improve this answer











                                          $endgroup$












                                          • $begingroup$
                                            Maybe Grid doesn't work because TIO can't center the items like in your picture?
                                            $endgroup$
                                            – AdmBorkBork
                                            2 days ago










                                          • $begingroup$
                                            @AdmBorkBork There is a way to load graphics like this in TIO. Someone had shown me last year I think. But i can't remember how to do it... So if anyone knows, let us know!
                                            $endgroup$
                                            – J42161217
                                            2 days ago















                                          2












                                          $begingroup$


                                          Wolfram Language (Mathematica), 123 bytes



                                          (s=#;Grid@Join[StringTake[ToString@DayName[s~d~#]&/@Range[-3,3],2],Partition[Last@d[s,#]&/@Range[-17,17],7]])&
                                          d=DatePlus


                                          Try it online!



                                          I don't know why Grid doesn't work on TIO but this code outputs this



                                          enter image description here



                                          @DavidC saved 1 byte






                                          share|improve this answer











                                          $endgroup$












                                          • $begingroup$
                                            Maybe Grid doesn't work because TIO can't center the items like in your picture?
                                            $endgroup$
                                            – AdmBorkBork
                                            2 days ago










                                          • $begingroup$
                                            @AdmBorkBork There is a way to load graphics like this in TIO. Someone had shown me last year I think. But i can't remember how to do it... So if anyone knows, let us know!
                                            $endgroup$
                                            – J42161217
                                            2 days ago













                                          2












                                          2








                                          2





                                          $begingroup$


                                          Wolfram Language (Mathematica), 123 bytes



                                          (s=#;Grid@Join[StringTake[ToString@DayName[s~d~#]&/@Range[-3,3],2],Partition[Last@d[s,#]&/@Range[-17,17],7]])&
                                          d=DatePlus


                                          Try it online!



                                          I don't know why Grid doesn't work on TIO but this code outputs this



                                          enter image description here



                                          @DavidC saved 1 byte






                                          share|improve this answer











                                          $endgroup$




                                          Wolfram Language (Mathematica), 123 bytes



                                          (s=#;Grid@Join[StringTake[ToString@DayName[s~d~#]&/@Range[-3,3],2],Partition[Last@d[s,#]&/@Range[-17,17],7]])&
                                          d=DatePlus


                                          Try it online!



                                          I don't know why Grid doesn't work on TIO but this code outputs this



                                          enter image description here



                                          @DavidC saved 1 byte







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited 2 days ago

























                                          answered Apr 4 at 20:25









                                          J42161217J42161217

                                          13.8k21253




                                          13.8k21253











                                          • $begingroup$
                                            Maybe Grid doesn't work because TIO can't center the items like in your picture?
                                            $endgroup$
                                            – AdmBorkBork
                                            2 days ago










                                          • $begingroup$
                                            @AdmBorkBork There is a way to load graphics like this in TIO. Someone had shown me last year I think. But i can't remember how to do it... So if anyone knows, let us know!
                                            $endgroup$
                                            – J42161217
                                            2 days ago
















                                          • $begingroup$
                                            Maybe Grid doesn't work because TIO can't center the items like in your picture?
                                            $endgroup$
                                            – AdmBorkBork
                                            2 days ago










                                          • $begingroup$
                                            @AdmBorkBork There is a way to load graphics like this in TIO. Someone had shown me last year I think. But i can't remember how to do it... So if anyone knows, let us know!
                                            $endgroup$
                                            – J42161217
                                            2 days ago















                                          $begingroup$
                                          Maybe Grid doesn't work because TIO can't center the items like in your picture?
                                          $endgroup$
                                          – AdmBorkBork
                                          2 days ago




                                          $begingroup$
                                          Maybe Grid doesn't work because TIO can't center the items like in your picture?
                                          $endgroup$
                                          – AdmBorkBork
                                          2 days ago












                                          $begingroup$
                                          @AdmBorkBork There is a way to load graphics like this in TIO. Someone had shown me last year I think. But i can't remember how to do it... So if anyone knows, let us know!
                                          $endgroup$
                                          – J42161217
                                          2 days ago




                                          $begingroup$
                                          @AdmBorkBork There is a way to load graphics like this in TIO. Someone had shown me last year I think. But i can't remember how to do it... So if anyone knows, let us know!
                                          $endgroup$
                                          – J42161217
                                          2 days ago











                                          2












                                          $begingroup$


                                          Perl 6, 87 bytes





                                          comb 21,($_-17..$_+17)>>.day.fmt('%2d')


                                          Try it online!



                                          Takes a Date object, returns a list of lines.






                                          share|improve this answer











                                          $endgroup$

















                                            2












                                            $begingroup$


                                            Perl 6, 87 bytes





                                            comb 21,($_-17..$_+17)>>.day.fmt('%2d')


                                            Try it online!



                                            Takes a Date object, returns a list of lines.






                                            share|improve this answer











                                            $endgroup$















                                              2












                                              2








                                              2





                                              $begingroup$


                                              Perl 6, 87 bytes





                                              comb 21,($_-17..$_+17)>>.day.fmt('%2d')


                                              Try it online!



                                              Takes a Date object, returns a list of lines.






                                              share|improve this answer











                                              $endgroup$




                                              Perl 6, 87 bytes





                                              comb 21,($_-17..$_+17)>>.day.fmt('%2d')


                                              Try it online!



                                              Takes a Date object, returns a list of lines.







                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited 2 days ago

























                                              answered 2 days ago









                                              nwellnhofnwellnhof

                                              7,43011128




                                              7,43011128





















                                                  2












                                                  $begingroup$


                                                  MATL, 34 33 31 bytes



                                                  YO-17:17+t7:)8XOO3Z(!1ew7XOU7e!


                                                  Try it online!



                                                  Explanation



                                                  YO % Implicit input. Convert to date number. This is a single number
                                                  % that specifies the date
                                                  -17:17 % Push [-17 -16 ... 16 17]
                                                  + % Add to date number, element-wise. This gives a row vector of 35
                                                  % date numbers centered around the input date
                                                  t % Duplicate
                                                  7: % Push [1 2 ... 7]
                                                  ) % Index into the 35-element vector. This keeps the first 7 entries
                                                  8XO % Convert to day-of-week in 3 letters. Gives a 3-col char matrix
                                                  O3Z( % Write char 0 (equivalent to space for display purposes) into the
                                                  % 3rd column
                                                  !1e % Tranpose and linearize into a row. This produces a string such as
                                                  % 'Tu We Th Fr Sa Su Mo ', to be used as column headings
                                                  w % Swap. This brings to top the row vector of 35 date numbers
                                                  % computed from the input
                                                  7XO % Convert to day-of-month. Gives a 2-col char matrix
                                                  U % Convert each row to number
                                                  7e! % Reshape into 7-row matrix and transpose
                                                  % Implicit display. This prints the string with the headings and
                                                  % the matrix. The latter has a minimum-one-space separation between
                                                  % columns, so it is aligned with the headings





                                                  share|improve this answer











                                                  $endgroup$

















                                                    2












                                                    $begingroup$


                                                    MATL, 34 33 31 bytes



                                                    YO-17:17+t7:)8XOO3Z(!1ew7XOU7e!


                                                    Try it online!



                                                    Explanation



                                                    YO % Implicit input. Convert to date number. This is a single number
                                                    % that specifies the date
                                                    -17:17 % Push [-17 -16 ... 16 17]
                                                    + % Add to date number, element-wise. This gives a row vector of 35
                                                    % date numbers centered around the input date
                                                    t % Duplicate
                                                    7: % Push [1 2 ... 7]
                                                    ) % Index into the 35-element vector. This keeps the first 7 entries
                                                    8XO % Convert to day-of-week in 3 letters. Gives a 3-col char matrix
                                                    O3Z( % Write char 0 (equivalent to space for display purposes) into the
                                                    % 3rd column
                                                    !1e % Tranpose and linearize into a row. This produces a string such as
                                                    % 'Tu We Th Fr Sa Su Mo ', to be used as column headings
                                                    w % Swap. This brings to top the row vector of 35 date numbers
                                                    % computed from the input
                                                    7XO % Convert to day-of-month. Gives a 2-col char matrix
                                                    U % Convert each row to number
                                                    7e! % Reshape into 7-row matrix and transpose
                                                    % Implicit display. This prints the string with the headings and
                                                    % the matrix. The latter has a minimum-one-space separation between
                                                    % columns, so it is aligned with the headings





                                                    share|improve this answer











                                                    $endgroup$















                                                      2












                                                      2








                                                      2





                                                      $begingroup$


                                                      MATL, 34 33 31 bytes



                                                      YO-17:17+t7:)8XOO3Z(!1ew7XOU7e!


                                                      Try it online!



                                                      Explanation



                                                      YO % Implicit input. Convert to date number. This is a single number
                                                      % that specifies the date
                                                      -17:17 % Push [-17 -16 ... 16 17]
                                                      + % Add to date number, element-wise. This gives a row vector of 35
                                                      % date numbers centered around the input date
                                                      t % Duplicate
                                                      7: % Push [1 2 ... 7]
                                                      ) % Index into the 35-element vector. This keeps the first 7 entries
                                                      8XO % Convert to day-of-week in 3 letters. Gives a 3-col char matrix
                                                      O3Z( % Write char 0 (equivalent to space for display purposes) into the
                                                      % 3rd column
                                                      !1e % Tranpose and linearize into a row. This produces a string such as
                                                      % 'Tu We Th Fr Sa Su Mo ', to be used as column headings
                                                      w % Swap. This brings to top the row vector of 35 date numbers
                                                      % computed from the input
                                                      7XO % Convert to day-of-month. Gives a 2-col char matrix
                                                      U % Convert each row to number
                                                      7e! % Reshape into 7-row matrix and transpose
                                                      % Implicit display. This prints the string with the headings and
                                                      % the matrix. The latter has a minimum-one-space separation between
                                                      % columns, so it is aligned with the headings





                                                      share|improve this answer











                                                      $endgroup$




                                                      MATL, 34 33 31 bytes



                                                      YO-17:17+t7:)8XOO3Z(!1ew7XOU7e!


                                                      Try it online!



                                                      Explanation



                                                      YO % Implicit input. Convert to date number. This is a single number
                                                      % that specifies the date
                                                      -17:17 % Push [-17 -16 ... 16 17]
                                                      + % Add to date number, element-wise. This gives a row vector of 35
                                                      % date numbers centered around the input date
                                                      t % Duplicate
                                                      7: % Push [1 2 ... 7]
                                                      ) % Index into the 35-element vector. This keeps the first 7 entries
                                                      8XO % Convert to day-of-week in 3 letters. Gives a 3-col char matrix
                                                      O3Z( % Write char 0 (equivalent to space for display purposes) into the
                                                      % 3rd column
                                                      !1e % Tranpose and linearize into a row. This produces a string such as
                                                      % 'Tu We Th Fr Sa Su Mo ', to be used as column headings
                                                      w % Swap. This brings to top the row vector of 35 date numbers
                                                      % computed from the input
                                                      7XO % Convert to day-of-month. Gives a 2-col char matrix
                                                      U % Convert each row to number
                                                      7e! % Reshape into 7-row matrix and transpose
                                                      % Implicit display. This prints the string with the headings and
                                                      % the matrix. The latter has a minimum-one-space separation between
                                                      % columns, so it is aligned with the headings






                                                      share|improve this answer














                                                      share|improve this answer



                                                      share|improve this answer








                                                      edited 2 days ago

























                                                      answered 2 days ago









                                                      Luis MendoLuis Mendo

                                                      75.2k889292




                                                      75.2k889292





















                                                          2












                                                          $begingroup$


                                                          Java (JDK), 149 bytes





                                                          d->d.add(5,-24);for(int i=0,w;i<42;d.add(5,1))System.out.printf("%c%2s",i%7<1?10:32,i++<7?"SaSuMoTuWeThFr".substring(w=d.get(7)%7*2,w+2):d.get(5));


                                                          Try it online!



                                                          Credits



                                                          • -13 bytes thanks to Kevin Cruijssen.





                                                          share|improve this answer











                                                          $endgroup$








                                                          • 1




                                                            $begingroup$
                                                            159 bytes
                                                            $endgroup$
                                                            – Kevin Cruijssen
                                                            2 days ago






                                                          • 1




                                                            $begingroup$
                                                            @KevinCruijssen Wait... what? I congratulate you! I tried to do this, but couldn't find a way to do it, and yet you did it! Very nice :-)
                                                            $endgroup$
                                                            – Olivier Grégoire
                                                            2 days ago







                                                          • 1




                                                            $begingroup$
                                                            Maybe you see something more to combine the i and j somehow? Or something shorter for j++%7<1?10:32 with some bitwise magic? But I'll leave that to you. I'm going back to work, lol. ;)
                                                            $endgroup$
                                                            – Kevin Cruijssen
                                                            2 days ago







                                                          • 1




                                                            $begingroup$
                                                            Ah, of course.. Nice teamwork! ;) PS: Where does the w stand for? Why not h for header?
                                                            $endgroup$
                                                            – Kevin Cruijssen
                                                            2 days ago






                                                          • 1




                                                            $begingroup$
                                                            @KevinCruijssen w for "day of week". Also, bit twiddling can only lead to (i%7+6)/7*22+10 which is much longer.
                                                            $endgroup$
                                                            – Olivier Grégoire
                                                            2 days ago
















                                                          2












                                                          $begingroup$


                                                          Java (JDK), 149 bytes





                                                          d->d.add(5,-24);for(int i=0,w;i<42;d.add(5,1))System.out.printf("%c%2s",i%7<1?10:32,i++<7?"SaSuMoTuWeThFr".substring(w=d.get(7)%7*2,w+2):d.get(5));


                                                          Try it online!



                                                          Credits



                                                          • -13 bytes thanks to Kevin Cruijssen.





                                                          share|improve this answer











                                                          $endgroup$








                                                          • 1




                                                            $begingroup$
                                                            159 bytes
                                                            $endgroup$
                                                            – Kevin Cruijssen
                                                            2 days ago






                                                          • 1




                                                            $begingroup$
                                                            @KevinCruijssen Wait... what? I congratulate you! I tried to do this, but couldn't find a way to do it, and yet you did it! Very nice :-)
                                                            $endgroup$
                                                            – Olivier Grégoire
                                                            2 days ago







                                                          • 1




                                                            $begingroup$
                                                            Maybe you see something more to combine the i and j somehow? Or something shorter for j++%7<1?10:32 with some bitwise magic? But I'll leave that to you. I'm going back to work, lol. ;)
                                                            $endgroup$
                                                            – Kevin Cruijssen
                                                            2 days ago







                                                          • 1




                                                            $begingroup$
                                                            Ah, of course.. Nice teamwork! ;) PS: Where does the w stand for? Why not h for header?
                                                            $endgroup$
                                                            – Kevin Cruijssen
                                                            2 days ago






                                                          • 1




                                                            $begingroup$
                                                            @KevinCruijssen w for "day of week". Also, bit twiddling can only lead to (i%7+6)/7*22+10 which is much longer.
                                                            $endgroup$
                                                            – Olivier Grégoire
                                                            2 days ago














                                                          2












                                                          2








                                                          2





                                                          $begingroup$


                                                          Java (JDK), 149 bytes





                                                          d->d.add(5,-24);for(int i=0,w;i<42;d.add(5,1))System.out.printf("%c%2s",i%7<1?10:32,i++<7?"SaSuMoTuWeThFr".substring(w=d.get(7)%7*2,w+2):d.get(5));


                                                          Try it online!



                                                          Credits



                                                          • -13 bytes thanks to Kevin Cruijssen.





                                                          share|improve this answer











                                                          $endgroup$




                                                          Java (JDK), 149 bytes





                                                          d->d.add(5,-24);for(int i=0,w;i<42;d.add(5,1))System.out.printf("%c%2s",i%7<1?10:32,i++<7?"SaSuMoTuWeThFr".substring(w=d.get(7)%7*2,w+2):d.get(5));


                                                          Try it online!



                                                          Credits



                                                          • -13 bytes thanks to Kevin Cruijssen.






                                                          share|improve this answer














                                                          share|improve this answer



                                                          share|improve this answer








                                                          edited 2 days ago

























                                                          answered 2 days ago









                                                          Olivier GrégoireOlivier Grégoire

                                                          9,39511944




                                                          9,39511944







                                                          • 1




                                                            $begingroup$
                                                            159 bytes
                                                            $endgroup$
                                                            – Kevin Cruijssen
                                                            2 days ago






                                                          • 1




                                                            $begingroup$
                                                            @KevinCruijssen Wait... what? I congratulate you! I tried to do this, but couldn't find a way to do it, and yet you did it! Very nice :-)
                                                            $endgroup$
                                                            – Olivier Grégoire
                                                            2 days ago







                                                          • 1




                                                            $begingroup$
                                                            Maybe you see something more to combine the i and j somehow? Or something shorter for j++%7<1?10:32 with some bitwise magic? But I'll leave that to you. I'm going back to work, lol. ;)
                                                            $endgroup$
                                                            – Kevin Cruijssen
                                                            2 days ago







                                                          • 1




                                                            $begingroup$
                                                            Ah, of course.. Nice teamwork! ;) PS: Where does the w stand for? Why not h for header?
                                                            $endgroup$
                                                            – Kevin Cruijssen
                                                            2 days ago






                                                          • 1




                                                            $begingroup$
                                                            @KevinCruijssen w for "day of week". Also, bit twiddling can only lead to (i%7+6)/7*22+10 which is much longer.
                                                            $endgroup$
                                                            – Olivier Grégoire
                                                            2 days ago













                                                          • 1




                                                            $begingroup$
                                                            159 bytes
                                                            $endgroup$
                                                            – Kevin Cruijssen
                                                            2 days ago






                                                          • 1




                                                            $begingroup$
                                                            @KevinCruijssen Wait... what? I congratulate you! I tried to do this, but couldn't find a way to do it, and yet you did it! Very nice :-)
                                                            $endgroup$
                                                            – Olivier Grégoire
                                                            2 days ago







                                                          • 1




                                                            $begingroup$
                                                            Maybe you see something more to combine the i and j somehow? Or something shorter for j++%7<1?10:32 with some bitwise magic? But I'll leave that to you. I'm going back to work, lol. ;)
                                                            $endgroup$
                                                            – Kevin Cruijssen
                                                            2 days ago







                                                          • 1




                                                            $begingroup$
                                                            Ah, of course.. Nice teamwork! ;) PS: Where does the w stand for? Why not h for header?
                                                            $endgroup$
                                                            – Kevin Cruijssen
                                                            2 days ago






                                                          • 1




                                                            $begingroup$
                                                            @KevinCruijssen w for "day of week". Also, bit twiddling can only lead to (i%7+6)/7*22+10 which is much longer.
                                                            $endgroup$
                                                            – Olivier Grégoire
                                                            2 days ago








                                                          1




                                                          1




                                                          $begingroup$
                                                          159 bytes
                                                          $endgroup$
                                                          – Kevin Cruijssen
                                                          2 days ago




                                                          $begingroup$
                                                          159 bytes
                                                          $endgroup$
                                                          – Kevin Cruijssen
                                                          2 days ago




                                                          1




                                                          1




                                                          $begingroup$
                                                          @KevinCruijssen Wait... what? I congratulate you! I tried to do this, but couldn't find a way to do it, and yet you did it! Very nice :-)
                                                          $endgroup$
                                                          – Olivier Grégoire
                                                          2 days ago





                                                          $begingroup$
                                                          @KevinCruijssen Wait... what? I congratulate you! I tried to do this, but couldn't find a way to do it, and yet you did it! Very nice :-)
                                                          $endgroup$
                                                          – Olivier Grégoire
                                                          2 days ago





                                                          1




                                                          1




                                                          $begingroup$
                                                          Maybe you see something more to combine the i and j somehow? Or something shorter for j++%7<1?10:32 with some bitwise magic? But I'll leave that to you. I'm going back to work, lol. ;)
                                                          $endgroup$
                                                          – Kevin Cruijssen
                                                          2 days ago





                                                          $begingroup$
                                                          Maybe you see something more to combine the i and j somehow? Or something shorter for j++%7<1?10:32 with some bitwise magic? But I'll leave that to you. I'm going back to work, lol. ;)
                                                          $endgroup$
                                                          – Kevin Cruijssen
                                                          2 days ago





                                                          1




                                                          1




                                                          $begingroup$
                                                          Ah, of course.. Nice teamwork! ;) PS: Where does the w stand for? Why not h for header?
                                                          $endgroup$
                                                          – Kevin Cruijssen
                                                          2 days ago




                                                          $begingroup$
                                                          Ah, of course.. Nice teamwork! ;) PS: Where does the w stand for? Why not h for header?
                                                          $endgroup$
                                                          – Kevin Cruijssen
                                                          2 days ago




                                                          1




                                                          1




                                                          $begingroup$
                                                          @KevinCruijssen w for "day of week". Also, bit twiddling can only lead to (i%7+6)/7*22+10 which is much longer.
                                                          $endgroup$
                                                          – Olivier Grégoire
                                                          2 days ago





                                                          $begingroup$
                                                          @KevinCruijssen w for "day of week". Also, bit twiddling can only lead to (i%7+6)/7*22+10 which is much longer.
                                                          $endgroup$
                                                          – Olivier Grégoire
                                                          2 days ago












                                                          2












                                                          $begingroup$


                                                          PHP, 197 189 187 bytes



                                                          for($d=date_create($argn)->sub($i=new DateInterval(P17D)),$i->d=1;$x++<35;$h.=$x<8?substr($d->format(D),0,2).' ':'',$d->add($i))$o.=str_pad($d->format(j),3,' ',2);echo wordwrap($h.$o,20);


                                                          Try it online!



                                                          Input is STDIN as a date string. Run with php -nF.



                                                          $ echo April 2 2019|php -nF cal.php

                                                          Sa Su Mo Tu We Th Fr
                                                          16 17 18 19 20 21 22
                                                          23 24 25 26 27 28 29
                                                          30 31 1 2 3 4 5
                                                          6 7 8 9 10 11 12
                                                          13 14 15 16 17 18 19


                                                          Verify all test cases



                                                          Or 174 bytes with zero-padded single digits.






                                                          share|improve this answer











                                                          $endgroup$

















                                                            2












                                                            $begingroup$


                                                            PHP, 197 189 187 bytes



                                                            for($d=date_create($argn)->sub($i=new DateInterval(P17D)),$i->d=1;$x++<35;$h.=$x<8?substr($d->format(D),0,2).' ':'',$d->add($i))$o.=str_pad($d->format(j),3,' ',2);echo wordwrap($h.$o,20);


                                                            Try it online!



                                                            Input is STDIN as a date string. Run with php -nF.



                                                            $ echo April 2 2019|php -nF cal.php

                                                            Sa Su Mo Tu We Th Fr
                                                            16 17 18 19 20 21 22
                                                            23 24 25 26 27 28 29
                                                            30 31 1 2 3 4 5
                                                            6 7 8 9 10 11 12
                                                            13 14 15 16 17 18 19


                                                            Verify all test cases



                                                            Or 174 bytes with zero-padded single digits.






                                                            share|improve this answer











                                                            $endgroup$















                                                              2












                                                              2








                                                              2





                                                              $begingroup$


                                                              PHP, 197 189 187 bytes



                                                              for($d=date_create($argn)->sub($i=new DateInterval(P17D)),$i->d=1;$x++<35;$h.=$x<8?substr($d->format(D),0,2).' ':'',$d->add($i))$o.=str_pad($d->format(j),3,' ',2);echo wordwrap($h.$o,20);


                                                              Try it online!



                                                              Input is STDIN as a date string. Run with php -nF.



                                                              $ echo April 2 2019|php -nF cal.php

                                                              Sa Su Mo Tu We Th Fr
                                                              16 17 18 19 20 21 22
                                                              23 24 25 26 27 28 29
                                                              30 31 1 2 3 4 5
                                                              6 7 8 9 10 11 12
                                                              13 14 15 16 17 18 19


                                                              Verify all test cases



                                                              Or 174 bytes with zero-padded single digits.






                                                              share|improve this answer











                                                              $endgroup$




                                                              PHP, 197 189 187 bytes



                                                              for($d=date_create($argn)->sub($i=new DateInterval(P17D)),$i->d=1;$x++<35;$h.=$x<8?substr($d->format(D),0,2).' ':'',$d->add($i))$o.=str_pad($d->format(j),3,' ',2);echo wordwrap($h.$o,20);


                                                              Try it online!



                                                              Input is STDIN as a date string. Run with php -nF.



                                                              $ echo April 2 2019|php -nF cal.php

                                                              Sa Su Mo Tu We Th Fr
                                                              16 17 18 19 20 21 22
                                                              23 24 25 26 27 28 29
                                                              30 31 1 2 3 4 5
                                                              6 7 8 9 10 11 12
                                                              13 14 15 16 17 18 19


                                                              Verify all test cases



                                                              Or 174 bytes with zero-padded single digits.







                                                              share|improve this answer














                                                              share|improve this answer



                                                              share|improve this answer








                                                              edited 2 days ago

























                                                              answered Apr 4 at 21:11









                                                              gwaughgwaugh

                                                              2,0281517




                                                              2,0281517





















                                                                  0












                                                                  $begingroup$


                                                                  Red, 153 131 bytes



                                                                  func[d][s: d - 24 loop 7[prin[""copy/part system/locale/days/(s/10) 2]s:
                                                                  s + 1]loop 5[print""loop 7[prin pad/left s/4 3 s: s + 1]]]


                                                                  Try it online!






                                                                  share|improve this answer











                                                                  $endgroup$

















                                                                    0












                                                                    $begingroup$


                                                                    Red, 153 131 bytes



                                                                    func[d][s: d - 24 loop 7[prin[""copy/part system/locale/days/(s/10) 2]s:
                                                                    s + 1]loop 5[print""loop 7[prin pad/left s/4 3 s: s + 1]]]


                                                                    Try it online!






                                                                    share|improve this answer











                                                                    $endgroup$















                                                                      0












                                                                      0








                                                                      0





                                                                      $begingroup$


                                                                      Red, 153 131 bytes



                                                                      func[d][s: d - 24 loop 7[prin[""copy/part system/locale/days/(s/10) 2]s:
                                                                      s + 1]loop 5[print""loop 7[prin pad/left s/4 3 s: s + 1]]]


                                                                      Try it online!






                                                                      share|improve this answer











                                                                      $endgroup$




                                                                      Red, 153 131 bytes



                                                                      func[d][s: d - 24 loop 7[prin[""copy/part system/locale/days/(s/10) 2]s:
                                                                      s + 1]loop 5[print""loop 7[prin pad/left s/4 3 s: s + 1]]]


                                                                      Try it online!







                                                                      share|improve this answer














                                                                      share|improve this answer



                                                                      share|improve this answer








                                                                      edited 2 days ago

























                                                                      answered 2 days ago









                                                                      Galen IvanovGalen Ivanov

                                                                      7,38211034




                                                                      7,38211034





















                                                                          0












                                                                          $begingroup$

                                                                          T-SQL, 203 bytes



                                                                          DECLARE @f date='2020-02-19'

                                                                          ,@ char(20)=0,@d char(105)=0SELECT
                                                                          @=left(format(d,'D'),2)+' '+@,@d=right(d,2)+char(32-n%7/6*19)+@d
                                                                          FROM(SELECT dateadd(d,number-17,@f)d,number n
                                                                          FROM spt_values WHERE'P'=type)x ORDER BY-n
                                                                          PRINT @+'
                                                                          '+@d


                                                                          The online version is slightly different, this posted version works in MS-SQL Studio Management. It saves 1 bytes compared with the online version, but doesn't give the correct result online



                                                                          Try it online






                                                                          share|improve this answer











                                                                          $endgroup$

















                                                                            0












                                                                            $begingroup$

                                                                            T-SQL, 203 bytes



                                                                            DECLARE @f date='2020-02-19'

                                                                            ,@ char(20)=0,@d char(105)=0SELECT
                                                                            @=left(format(d,'D'),2)+' '+@,@d=right(d,2)+char(32-n%7/6*19)+@d
                                                                            FROM(SELECT dateadd(d,number-17,@f)d,number n
                                                                            FROM spt_values WHERE'P'=type)x ORDER BY-n
                                                                            PRINT @+'
                                                                            '+@d


                                                                            The online version is slightly different, this posted version works in MS-SQL Studio Management. It saves 1 bytes compared with the online version, but doesn't give the correct result online



                                                                            Try it online






                                                                            share|improve this answer











                                                                            $endgroup$















                                                                              0












                                                                              0








                                                                              0





                                                                              $begingroup$

                                                                              T-SQL, 203 bytes



                                                                              DECLARE @f date='2020-02-19'

                                                                              ,@ char(20)=0,@d char(105)=0SELECT
                                                                              @=left(format(d,'D'),2)+' '+@,@d=right(d,2)+char(32-n%7/6*19)+@d
                                                                              FROM(SELECT dateadd(d,number-17,@f)d,number n
                                                                              FROM spt_values WHERE'P'=type)x ORDER BY-n
                                                                              PRINT @+'
                                                                              '+@d


                                                                              The online version is slightly different, this posted version works in MS-SQL Studio Management. It saves 1 bytes compared with the online version, but doesn't give the correct result online



                                                                              Try it online






                                                                              share|improve this answer











                                                                              $endgroup$



                                                                              T-SQL, 203 bytes



                                                                              DECLARE @f date='2020-02-19'

                                                                              ,@ char(20)=0,@d char(105)=0SELECT
                                                                              @=left(format(d,'D'),2)+' '+@,@d=right(d,2)+char(32-n%7/6*19)+@d
                                                                              FROM(SELECT dateadd(d,number-17,@f)d,number n
                                                                              FROM spt_values WHERE'P'=type)x ORDER BY-n
                                                                              PRINT @+'
                                                                              '+@d


                                                                              The online version is slightly different, this posted version works in MS-SQL Studio Management. It saves 1 bytes compared with the online version, but doesn't give the correct result online



                                                                              Try it online







                                                                              share|improve this answer














                                                                              share|improve this answer



                                                                              share|improve this answer








                                                                              edited 2 days ago

























                                                                              answered 2 days ago









                                                                              t-clausen.dkt-clausen.dk

                                                                              2,074314




                                                                              2,074314





















                                                                                  0












                                                                                  $begingroup$


                                                                                  Python 2, 115 bytes





                                                                                  from datetime import*
                                                                                  d=input()
                                                                                  for i in range(42):print(d+timedelta(i-24)).strftime('%'+'da'[i<7])[:2]+i%7/6*'n',


                                                                                  Try it online!



                                                                                  Not sure if this is allowed... takes input from STDIN in the form date(year, month, day). This can also be represented as __import__('datetime').date(year, month, day). These are really __import__('datetime').date objects.






                                                                                  share|improve this answer









                                                                                  $endgroup$

















                                                                                    0












                                                                                    $begingroup$


                                                                                    Python 2, 115 bytes





                                                                                    from datetime import*
                                                                                    d=input()
                                                                                    for i in range(42):print(d+timedelta(i-24)).strftime('%'+'da'[i<7])[:2]+i%7/6*'n',


                                                                                    Try it online!



                                                                                    Not sure if this is allowed... takes input from STDIN in the form date(year, month, day). This can also be represented as __import__('datetime').date(year, month, day). These are really __import__('datetime').date objects.






                                                                                    share|improve this answer









                                                                                    $endgroup$















                                                                                      0












                                                                                      0








                                                                                      0





                                                                                      $begingroup$


                                                                                      Python 2, 115 bytes





                                                                                      from datetime import*
                                                                                      d=input()
                                                                                      for i in range(42):print(d+timedelta(i-24)).strftime('%'+'da'[i<7])[:2]+i%7/6*'n',


                                                                                      Try it online!



                                                                                      Not sure if this is allowed... takes input from STDIN in the form date(year, month, day). This can also be represented as __import__('datetime').date(year, month, day). These are really __import__('datetime').date objects.






                                                                                      share|improve this answer









                                                                                      $endgroup$




                                                                                      Python 2, 115 bytes





                                                                                      from datetime import*
                                                                                      d=input()
                                                                                      for i in range(42):print(d+timedelta(i-24)).strftime('%'+'da'[i<7])[:2]+i%7/6*'n',


                                                                                      Try it online!



                                                                                      Not sure if this is allowed... takes input from STDIN in the form date(year, month, day). This can also be represented as __import__('datetime').date(year, month, day). These are really __import__('datetime').date objects.







                                                                                      share|improve this answer












                                                                                      share|improve this answer



                                                                                      share|improve this answer










                                                                                      answered yesterday









                                                                                      Erik the OutgolferErik the Outgolfer

                                                                                      33k429106




                                                                                      33k429106



























                                                                                          draft saved

                                                                                          draft discarded
















































                                                                                          If this is an answer to a challenge…



                                                                                          • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                                                                          • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                                                                            Explanations of your answer make it more interesting to read and are very much encouraged.


                                                                                          • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


                                                                                          More generally…



                                                                                          • …Please make sure to answer the question and provide sufficient detail.


                                                                                          • …Avoid asking for help, clarification or responding to other answers (use comments instead).




                                                                                          draft saved


                                                                                          draft discarded














                                                                                          StackExchange.ready(
                                                                                          function ()
                                                                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f182681%2ftoday-is-the-center%23new-answer', 'question_page');

                                                                                          );

                                                                                          Post as a guest















                                                                                          Required, but never shown





















































                                                                                          Required, but never shown














                                                                                          Required, but never shown












                                                                                          Required, but never shown







                                                                                          Required, but never shown

































                                                                                          Required, but never shown














                                                                                          Required, but never shown












                                                                                          Required, but never shown







                                                                                          Required, but never shown







                                                                                          Popular posts from this blog

                                                                                          Àrd-bhaile Cathair chruinne/Baile mòr cruinne | Artagailean ceangailte | Clàr-taice na seòladaireachd

                                                                                          대한민국 목차 국명 지리 역사 정치 국방 경제 사회 문화 국제 순위 관련 항목 각주 외부 링크 둘러보기 메뉴북위 37° 34′ 08″ 동경 126° 58′ 36″ / 북위 37.568889° 동경 126.976667°  / 37.568889; 126.976667ehThe Korean Repository문단을 편집문단을 편집추가해Clarkson PLC 사Report for Selected Countries and Subjects-Korea“Human Development Index and its components: P.198”“http://www.law.go.kr/%EB%B2%95%EB%A0%B9/%EB%8C%80%ED%95%9C%EB%AF%BC%EA%B5%AD%EA%B5%AD%EA%B8%B0%EB%B2%95”"한국은 국제법상 한반도 유일 합법정부 아니다" - 오마이뉴스 모바일Report for Selected Countries and Subjects: South Korea격동의 역사와 함께한 조선일보 90년 : 조선일보 인수해 혁신시킨 신석우, 임시정부 때는 '대한민국' 국호(國號) 정해《우리가 몰랐던 우리 역사: 나라 이름의 비밀을 찾아가는 역사 여행》“남북 공식호칭 ‘남한’‘북한’으로 쓴다”“Corea 대 Korea, 누가 이긴 거야?”국내기후자료 - 한국[김대중 前 대통령 서거] 과감한 구조개혁 'DJ노믹스'로 최단기간 환란극복 :: 네이버 뉴스“이라크 "韓-쿠르드 유전개발 MOU 승인 안해"(종합)”“해외 우리국민 추방사례 43%가 일본”차기전차 K2'흑표'의 세계 최고 전력 분석, 쿠키뉴스 엄기영, 2007-03-02두산인프라, 헬기잡는 장갑차 'K21'...내년부터 공급, 고뉴스 이대준, 2008-10-30과거 내용 찾기mk 뉴스 - 구매력 기준으로 보면 한국 1인당 소득 3만弗과거 내용 찾기"The N-11: More Than an Acronym"Archived조선일보 최우석, 2008-11-01Global 500 2008: Countries - South Korea“몇년째 '시한폭탄'... 가계부채, 올해는 터질까”가구당 부채 5000만원 처음 넘어서“‘빚’으로 내몰리는 사회.. 위기의 가계대출”“[경제365] 공공부문 부채 급증…800조 육박”“"소득 양극화 다소 완화...불평등은 여전"”“공정사회·공생발전 한참 멀었네”iSuppli,08年2QのDRAMシェア・ランキングを発表(08/8/11)South Korea dominates shipbuilding industry | Stock Market News & Stocks to Watch from StraightStocks한국 자동차 생산, 3년 연속 세계 5위자동차수출 '현대-삼성 웃고 기아-대우-쌍용은 울고' 과거 내용 찾기동반성장위 창립 1주년 맞아Archived"중기적합 3개업종 합의 무시한 채 선정"李대통령, 사업 무분별 확장 소상공인 생계 위협 질타삼성-LG, 서민업종인 빵·분식사업 잇따라 철수상생은 뒷전…SSM ‘몸집 불리기’ 혈안Archived“경부고속도에 '아시안하이웨이' 표지판”'철의 실크로드' 앞서 '말(言)의 실크로드'부터, 프레시안 정창현, 2008-10-01“'서울 지하철은 안전한가?'”“서울시 “올해 안에 모든 지하철역 스크린도어 설치””“부산지하철 1,2호선 승강장 안전펜스 설치 완료”“전교조, 정부 노조 통계서 처음 빠져”“[Weekly BIZ] 도요타 '제로 이사회'가 리콜 사태 불러들였다”“S Korea slams high tuition costs”““정치가 여론 양극화 부채질… 합리주의 절실””“〈"`촛불집회'는 민주주의의 질적 변화 상징"〉”““촛불집회가 민주주의 왜곡 초래””“국민 65%, "한국 노사관계 대립적"”“한국 국가경쟁력 27위‥노사관계 '꼴찌'”“제대로 형성되지 않은 대한민국 이념지형”“[신년기획-갈등의 시대] 갈등지수 OECD 4위…사회적 손실 GDP 27% 무려 300조”“2012 총선-대선의 키워드는 '국민과 소통'”“한국 삶의 질 27위, 2000년과 2008년 연속 하위권 머물러”“[해피 코리아] 행복점수 68점…해외 평가선 '낙제점'”“한국 어린이·청소년 행복지수 3년 연속 OECD ‘꼴찌’”“한국 이혼율 OECD중 8위”“[통계청] 한국 이혼율 OECD 4위”“오피니언 [이렇게 생각한다] `부부의 날` 에 돌아본 이혼율 1위 한국”“Suicide Rates by Country, Global Health Observatory Data Repository.”“1. 또 다른 차별”“오피니언 [편집자에게] '왕따'와 '패거리 정치' 심리는 닮은꼴”“[미래한국리포트] 무한경쟁에 빠진 대한민국”“대학생 98% "외모가 경쟁력이라는 말 동의"”“특급호텔 웨딩·200만원대 유모차… "남보다 더…" 호화病, 고질병 됐다”“[스트레스 공화국] ① 경쟁사회, 스트레스 쌓인다”““매일 30여명 자살 한국, 의사보다 무속인에…””“"자살 부르는 '우울증', 환자 중 85% 치료 안 받아"”“정신병원을 가다”“대한민국도 ‘묻지마 범죄’,안전지대 아니다”“유엔 "학생 '성적 지향'에 따른 차별 금지하라"”“유엔아동권리위원회 보고서 및 번역본 원문”“고졸 성공스토리 담은 '제빵왕 김탁구' 드라마 나온다”“‘빛 좋은 개살구’ 고졸 취업…실습 대신 착취”원본 문서“정신건강, 사회적 편견부터 고쳐드립니다”‘소통’과 ‘행복’에 목 마른 사회가 잠들어 있던 ‘심리학’ 깨웠다“[포토] 사유리-곽금주 교수의 유쾌한 심리상담”“"올해 한국인 평균 영화관람횟수 세계 1위"(종합)”“[게임연중기획] 게임은 문화다-여가활동 1순위 게임”“영화속 ‘영어 지상주의’ …“왠지 씁쓸한데””“2월 `신문 부수 인증기관` 지정..방송법 후속작업”“무료신문 성장동력 ‘차별성’과 ‘갈등해소’”대한민국 국회 법률지식정보시스템"Pew Research Center's Religion & Public Life Project: South Korea"“amp;vwcd=MT_ZTITLE&path=인구·가구%20>%20인구총조사%20>%20인구부문%20>%20 총조사인구(2005)%20>%20전수부문&oper_YN=Y&item=&keyword=종교별%20인구& amp;lang_mode=kor&list_id= 2005년 통계청 인구 총조사”원본 문서“한국인이 좋아하는 취미와 운동 (2004-2009)”“한국인이 좋아하는 취미와 운동 (2004-2014)”Archived“한국, `부분적 언론자유국' 강등〈프리덤하우스〉”“국경없는기자회 "한국, 인터넷감시 대상국"”“한국, 조선산업 1위 유지(S. Korea Stays Top Shipbuilding Nation) RZD-Partner Portal”원본 문서“한국, 4년 만에 ‘선박건조 1위’”“옛 마산시,인터넷속도 세계 1위”“"한국 초고속 인터넷망 세계1위"”“인터넷·휴대폰 요금, 외국보다 훨씬 비싸”“한국 관세행정 6년 연속 세계 '1위'”“한국 교통사고 사망자 수 OECD 회원국 중 2위”“결핵 후진국' 한국, 환자가 급증한 이유는”“수술은 신중해야… 자칫하면 생명 위협”대한민국분류대한민국의 지도대한민국 정부대표 다국어포털대한민국 전자정부대한민국 국회한국방송공사about korea and information korea브리태니커 백과사전(한국편)론리플래닛의 정보(한국편)CIA의 세계 정보(한국편)마리암 부디아 (Mariam Budia),『한국: 하늘이 내린 한 폭의 그림』, 서울: 트랜스라틴 19호 (2012년 3월)대한민국ehehehehehehehehehehehehehehWorldCat132441370n791268020000 0001 2308 81034078029-6026373548cb11863345f(데이터)00573706ge128495

                                                                                          Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition