Output the date in the Mel calendarValiDate ISO 8601 by RXResolving the Date Format DisputeRollover CalendarForgotten Realms date calculatorRoman-style date formattingFriday the 13thBeat Pure Regular Expressions at Validating ISO 8601 DatesThe Last MondayWhat's the Date?Date Occurrences

Why valarray so slow on VS2015?

What's an appropriate age to involve kids in life changing decisions?

Row vectors and column vectors (Mathematica vs Matlab)

Examples where existence is harder than evaluation

Which spells are in some way related to shadows or the Shadowfell?

"Estrontium" on poster

Hexagonal Grid Filling

How did Captain Marvel know where to find these characters?

How to find the transfer orbit from a initial circular orbit to a final elliptical orbit

How come mathematicians published in Annals of Eugenics?

What can cause an unfrozen indoor copper drain pipe to crack?

What is the status of the three crises in the history of mathematics?

Names of the Six Tastes

How likely are Coriolis-effect-based quirks to develop in starship crew members?

Thawing Glaciers return to hand interaction

Has there been evidence of any other gods?

I might have messed up in the 'Future Work' section of my thesis

Are there vaccine ingredients which may not be disclosed ("hidden", "trade secret", or similar)?

What is the minimum required technology to reanimate someone who has been cryogenically frozen?

if i accidentally leaked my schools ip address and someone d doses my school am i at fault

Can I bring back Planetary Romance as a genre?

Compactness in normed vector spaces.

Output the date in the Mel calendar

How can I make parentheses stick to formula?



Output the date in the Mel calendar


ValiDate ISO 8601 by RXResolving the Date Format DisputeRollover CalendarForgotten Realms date calculatorRoman-style date formattingFriday the 13thBeat Pure Regular Expressions at Validating ISO 8601 DatesThe Last MondayWhat's the Date?Date Occurrences













3












$begingroup$


The Mel calendar is used in the fictional world of Kaldia. Your goal is to convert dates into the Mel calendar.



This calendar has 13 months of 28 days each, plus 1 or 2 extra days after the last month. A year that is divisible by 4 but not by 100, or divisible by 400 has 366 days, and other years have 365 (i.e. our leap year rules, but with years in the Mel calendar).



You should use the month and day name abbreviations:



months: dia vio lis gil ful dyu mel ral zan pal mik fav ruj



days: dia vio lis gil ful dyu mel ral zan pal mik fav ruj ser rav tan lin rez jil din ket len lax nen pin mat kun mir



The extra days outside of any month have the month name of myuxet (no abbreviation here), and the day names are axet and teems, respectively.



0 dia dia is 1988/11/30.



You can take the input date as a string or a (year, month, day) tuple; alternatively, for functions, the parameter can be in your standard library's date type. The output should be a space-separated string.



Test cases



1776-07-04 => -213 ral ket
1859-12-15 => -129 dia rav
1917-04-14 => -72 ful nen
1981-02-04 => -8 lis mik
1988-11-30 => 0 dia dia
1988-12-01 => 0 dia vio
1988-12-28 => 0 vio dia
2017-01-01 => 28 vio ful
2019-04-22 => 30 dyu lis
2019-11-30 => 30 myuxet axet
2019-12-01 => 31 dia dia
2021-11-29 => 32 myuxet axet
2021-11-30 => 32 myuxet teems
2089-11-30 => 101 dia dia
2389-11-30 => 400 myuxet teems


Reference implementation in Perl 6



Standard loopholes are forbidden.










share|improve this question











$endgroup$







  • 3




    $begingroup$
    You should probably include in your post that axet and teems are at the end of the year, I was confused until I looked at the link
    $endgroup$
    – Embodiment of Ignorance
    56 mins ago










  • $begingroup$
    It has to be a space-separated string.
    $endgroup$
    – bb94
    22 mins ago










  • $begingroup$
    Can we take input as a three value named tuple or a list of three values each signifying year, month, and day?
    $endgroup$
    – Embodiment of Ignorance
    19 mins ago










  • $begingroup$
    Yes, that's fine.
    $endgroup$
    – bb94
    17 mins ago















3












$begingroup$


The Mel calendar is used in the fictional world of Kaldia. Your goal is to convert dates into the Mel calendar.



This calendar has 13 months of 28 days each, plus 1 or 2 extra days after the last month. A year that is divisible by 4 but not by 100, or divisible by 400 has 366 days, and other years have 365 (i.e. our leap year rules, but with years in the Mel calendar).



You should use the month and day name abbreviations:



months: dia vio lis gil ful dyu mel ral zan pal mik fav ruj



days: dia vio lis gil ful dyu mel ral zan pal mik fav ruj ser rav tan lin rez jil din ket len lax nen pin mat kun mir



The extra days outside of any month have the month name of myuxet (no abbreviation here), and the day names are axet and teems, respectively.



0 dia dia is 1988/11/30.



You can take the input date as a string or a (year, month, day) tuple; alternatively, for functions, the parameter can be in your standard library's date type. The output should be a space-separated string.



Test cases



1776-07-04 => -213 ral ket
1859-12-15 => -129 dia rav
1917-04-14 => -72 ful nen
1981-02-04 => -8 lis mik
1988-11-30 => 0 dia dia
1988-12-01 => 0 dia vio
1988-12-28 => 0 vio dia
2017-01-01 => 28 vio ful
2019-04-22 => 30 dyu lis
2019-11-30 => 30 myuxet axet
2019-12-01 => 31 dia dia
2021-11-29 => 32 myuxet axet
2021-11-30 => 32 myuxet teems
2089-11-30 => 101 dia dia
2389-11-30 => 400 myuxet teems


Reference implementation in Perl 6



Standard loopholes are forbidden.










share|improve this question











$endgroup$







  • 3




    $begingroup$
    You should probably include in your post that axet and teems are at the end of the year, I was confused until I looked at the link
    $endgroup$
    – Embodiment of Ignorance
    56 mins ago










  • $begingroup$
    It has to be a space-separated string.
    $endgroup$
    – bb94
    22 mins ago










  • $begingroup$
    Can we take input as a three value named tuple or a list of three values each signifying year, month, and day?
    $endgroup$
    – Embodiment of Ignorance
    19 mins ago










  • $begingroup$
    Yes, that's fine.
    $endgroup$
    – bb94
    17 mins ago













3












3








3





$begingroup$


The Mel calendar is used in the fictional world of Kaldia. Your goal is to convert dates into the Mel calendar.



This calendar has 13 months of 28 days each, plus 1 or 2 extra days after the last month. A year that is divisible by 4 but not by 100, or divisible by 400 has 366 days, and other years have 365 (i.e. our leap year rules, but with years in the Mel calendar).



You should use the month and day name abbreviations:



months: dia vio lis gil ful dyu mel ral zan pal mik fav ruj



days: dia vio lis gil ful dyu mel ral zan pal mik fav ruj ser rav tan lin rez jil din ket len lax nen pin mat kun mir



The extra days outside of any month have the month name of myuxet (no abbreviation here), and the day names are axet and teems, respectively.



0 dia dia is 1988/11/30.



You can take the input date as a string or a (year, month, day) tuple; alternatively, for functions, the parameter can be in your standard library's date type. The output should be a space-separated string.



Test cases



1776-07-04 => -213 ral ket
1859-12-15 => -129 dia rav
1917-04-14 => -72 ful nen
1981-02-04 => -8 lis mik
1988-11-30 => 0 dia dia
1988-12-01 => 0 dia vio
1988-12-28 => 0 vio dia
2017-01-01 => 28 vio ful
2019-04-22 => 30 dyu lis
2019-11-30 => 30 myuxet axet
2019-12-01 => 31 dia dia
2021-11-29 => 32 myuxet axet
2021-11-30 => 32 myuxet teems
2089-11-30 => 101 dia dia
2389-11-30 => 400 myuxet teems


Reference implementation in Perl 6



Standard loopholes are forbidden.










share|improve this question











$endgroup$




The Mel calendar is used in the fictional world of Kaldia. Your goal is to convert dates into the Mel calendar.



This calendar has 13 months of 28 days each, plus 1 or 2 extra days after the last month. A year that is divisible by 4 but not by 100, or divisible by 400 has 366 days, and other years have 365 (i.e. our leap year rules, but with years in the Mel calendar).



You should use the month and day name abbreviations:



months: dia vio lis gil ful dyu mel ral zan pal mik fav ruj



days: dia vio lis gil ful dyu mel ral zan pal mik fav ruj ser rav tan lin rez jil din ket len lax nen pin mat kun mir



The extra days outside of any month have the month name of myuxet (no abbreviation here), and the day names are axet and teems, respectively.



0 dia dia is 1988/11/30.



You can take the input date as a string or a (year, month, day) tuple; alternatively, for functions, the parameter can be in your standard library's date type. The output should be a space-separated string.



Test cases



1776-07-04 => -213 ral ket
1859-12-15 => -129 dia rav
1917-04-14 => -72 ful nen
1981-02-04 => -8 lis mik
1988-11-30 => 0 dia dia
1988-12-01 => 0 dia vio
1988-12-28 => 0 vio dia
2017-01-01 => 28 vio ful
2019-04-22 => 30 dyu lis
2019-11-30 => 30 myuxet axet
2019-12-01 => 31 dia dia
2021-11-29 => 32 myuxet axet
2021-11-30 => 32 myuxet teems
2089-11-30 => 101 dia dia
2389-11-30 => 400 myuxet teems


Reference implementation in Perl 6



Standard loopholes are forbidden.







code-golf date






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 17 mins ago







bb94

















asked 2 hours ago









bb94bb94

1,307714




1,307714







  • 3




    $begingroup$
    You should probably include in your post that axet and teems are at the end of the year, I was confused until I looked at the link
    $endgroup$
    – Embodiment of Ignorance
    56 mins ago










  • $begingroup$
    It has to be a space-separated string.
    $endgroup$
    – bb94
    22 mins ago










  • $begingroup$
    Can we take input as a three value named tuple or a list of three values each signifying year, month, and day?
    $endgroup$
    – Embodiment of Ignorance
    19 mins ago










  • $begingroup$
    Yes, that's fine.
    $endgroup$
    – bb94
    17 mins ago












  • 3




    $begingroup$
    You should probably include in your post that axet and teems are at the end of the year, I was confused until I looked at the link
    $endgroup$
    – Embodiment of Ignorance
    56 mins ago










  • $begingroup$
    It has to be a space-separated string.
    $endgroup$
    – bb94
    22 mins ago










  • $begingroup$
    Can we take input as a three value named tuple or a list of three values each signifying year, month, and day?
    $endgroup$
    – Embodiment of Ignorance
    19 mins ago










  • $begingroup$
    Yes, that's fine.
    $endgroup$
    – bb94
    17 mins ago







3




3




$begingroup$
You should probably include in your post that axet and teems are at the end of the year, I was confused until I looked at the link
$endgroup$
– Embodiment of Ignorance
56 mins ago




$begingroup$
You should probably include in your post that axet and teems are at the end of the year, I was confused until I looked at the link
$endgroup$
– Embodiment of Ignorance
56 mins ago












$begingroup$
It has to be a space-separated string.
$endgroup$
– bb94
22 mins ago




$begingroup$
It has to be a space-separated string.
$endgroup$
– bb94
22 mins ago












$begingroup$
Can we take input as a three value named tuple or a list of three values each signifying year, month, and day?
$endgroup$
– Embodiment of Ignorance
19 mins ago




$begingroup$
Can we take input as a three value named tuple or a list of three values each signifying year, month, and day?
$endgroup$
– Embodiment of Ignorance
19 mins ago












$begingroup$
Yes, that's fine.
$endgroup$
– bb94
17 mins ago




$begingroup$
Yes, that's fine.
$endgroup$
– bb94
17 mins ago










2 Answers
2






active

oldest

votes


















2












$begingroup$


Ruby, 199 bytes



Oof, only 23 bytes saved over the sample Perl code... I blame the fact that I have to subtract a bigger number due to using a Time class instead of what I assume is a Date class in Perl. (AFAIK importing Ruby's Date class is 2 bytes longer)





->dd-=62764070400;y=d.yday;m=y/28;s="diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".scan /.../;[d.year,m<13?s[m]:"myuxet",(m<13?s:%w[axet teems])[y%28-1]]*' '


Try it online!






share|improve this answer









$endgroup$




















    2












    $begingroup$


    Perl 6, 174 bytes





    ("myuxet"X <axet teems>))[.day-of-year-1])o*-726436


    Try it online!



    Generate a list of all the valid dates and then indexes the day of the year into that list.






    share|improve this answer











    $endgroup$













      Your Answer






      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%2f185339%2foutput-the-date-in-the-mel-calendar%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2












      $begingroup$


      Ruby, 199 bytes



      Oof, only 23 bytes saved over the sample Perl code... I blame the fact that I have to subtract a bigger number due to using a Time class instead of what I assume is a Date class in Perl. (AFAIK importing Ruby's Date class is 2 bytes longer)





      ->dd-=62764070400;y=d.yday;m=y/28;s="diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".scan /.../;[d.year,m<13?s[m]:"myuxet",(m<13?s:%w[axet teems])[y%28-1]]*' '


      Try it online!






      share|improve this answer









      $endgroup$

















        2












        $begingroup$


        Ruby, 199 bytes



        Oof, only 23 bytes saved over the sample Perl code... I blame the fact that I have to subtract a bigger number due to using a Time class instead of what I assume is a Date class in Perl. (AFAIK importing Ruby's Date class is 2 bytes longer)





        ->dd-=62764070400;y=d.yday;m=y/28;s="diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".scan /.../;[d.year,m<13?s[m]:"myuxet",(m<13?s:%w[axet teems])[y%28-1]]*' '


        Try it online!






        share|improve this answer









        $endgroup$















          2












          2








          2





          $begingroup$


          Ruby, 199 bytes



          Oof, only 23 bytes saved over the sample Perl code... I blame the fact that I have to subtract a bigger number due to using a Time class instead of what I assume is a Date class in Perl. (AFAIK importing Ruby's Date class is 2 bytes longer)





          ->dd-=62764070400;y=d.yday;m=y/28;s="diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".scan /.../;[d.year,m<13?s[m]:"myuxet",(m<13?s:%w[axet teems])[y%28-1]]*' '


          Try it online!






          share|improve this answer









          $endgroup$




          Ruby, 199 bytes



          Oof, only 23 bytes saved over the sample Perl code... I blame the fact that I have to subtract a bigger number due to using a Time class instead of what I assume is a Date class in Perl. (AFAIK importing Ruby's Date class is 2 bytes longer)





          ->dd-=62764070400;y=d.yday;m=y/28;s="diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".scan /.../;[d.year,m<13?s[m]:"myuxet",(m<13?s:%w[axet teems])[y%28-1]]*' '


          Try it online!







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 1 hour ago









          Value InkValue Ink

          7,905731




          7,905731





















              2












              $begingroup$


              Perl 6, 174 bytes





              ("myuxet"X <axet teems>))[.day-of-year-1])o*-726436


              Try it online!



              Generate a list of all the valid dates and then indexes the day of the year into that list.






              share|improve this answer











              $endgroup$

















                2












                $begingroup$


                Perl 6, 174 bytes





                ("myuxet"X <axet teems>))[.day-of-year-1])o*-726436


                Try it online!



                Generate a list of all the valid dates and then indexes the day of the year into that list.






                share|improve this answer











                $endgroup$















                  2












                  2








                  2





                  $begingroup$


                  Perl 6, 174 bytes





                  ("myuxet"X <axet teems>))[.day-of-year-1])o*-726436


                  Try it online!



                  Generate a list of all the valid dates and then indexes the day of the year into that list.






                  share|improve this answer











                  $endgroup$




                  Perl 6, 174 bytes





                  ("myuxet"X <axet teems>))[.day-of-year-1])o*-726436


                  Try it online!



                  Generate a list of all the valid dates and then indexes the day of the year into that list.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 22 mins ago

























                  answered 30 mins ago









                  Jo KingJo King

                  28k366134




                  28k366134



























                      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%2f185339%2foutput-the-date-in-the-mel-calendar%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

                      Log på Navigationsmenu

                      Wonderful Copenhagen (sang) Eksterne henvisninger | NavigationsmenurSide på frankloesser.comWonderful Copenhagen

                      Detroit Tigers Spis treści Historia | Skład zespołu | Sukcesy | Członkowie Baseball Hall of Fame | Zastrzeżone numery | Przypisy | Menu nawigacyjneEncyclopedia of Detroit - Detroit TigersTigers Stadium, Detroit, MITigers Timeline 1900sDetroit Tigers Team History & EncyclopediaTigers Timeline 1910s1935 World Series1945 World Series1945 World Series1984 World SeriesComerica Park, Detroit, MI2006 World Series2012 World SeriesDetroit Tigers 40-Man RosterDetroit Tigers Coaching StaffTigers Hall of FamersTigers Retired Numberse