Last modified: 25.3.2018
started: 1.2.2017
My goal was to make a public C# nuget package which allows programmers to program calendars and other applications with icelandic dates. Programmers should be able to find out which days are Icelandic holydays, and which days are Icelandic days who are important to icelanders without being a holiday.
About twenty years I go I wrote a c++ class which did exactly that. This project was about making this C++ class usable for every C Sharp developer out there. The C++ class will still handle the date calculations. I made a wrapper class for the C++ class and Class library with the wrapper class accessible to all.
A GNU GENERAL PUBLIC LICENSE Version 3 - a free, copyleft license for software.
Example program on how to use the Package after it is installed. In this example you can see how to create a Json string with an array of dates for the year. 2018.
The output of the code below is:
[{Date:"2018-1-1T00:00.000Z",Name:"nýársdagur",Hatidardagur:"1"},{Date:"2018-1-6T00:00.000Z",Name:"þrettándinn",Hatidardagur:"0"},{Date:"2018-1-19T00:00.000Z",Name:"bóndadagur",Hatidardagur:"0"},{Date:"2018-2-12T00:00.000Z",Name:"bolludagur",Hatidardagur:"0"},{Date:"2018-2-13T00:00.000Z",Name:"sprengidagur",Hatidardagur:"0"},{Date:"2018-2-14T00:00.000Z",Name:"öskudagur",Hatidardagur:"0"},{Date:"2018-2-25T00:00.000Z",Name:"konudagur",Hatidardagur:"0"},{Date:"2018-3-25T00:00.000Z",Name:"pálmasunnudagur",Hatidardagur:"1"},{Date:"2018-3-29T00:00.000Z",Name:"skírdagur",Hatidardagur:"1"},{Date:"2018-3-30T00:00.000Z",Name:"föstudagurinn langi",Hatidardagur:"1"},{Date:"2018-4-1T00:00.000Z",Name:"páskadagur",Hatidardagur:"1"},{Date:"2018-4-2T00:00.000Z",Name:"annar í páskum",Hatidardagur:"1"},{Date:"2018-4-19T00:00.000Z",Name:"sumardagurinn fyrsti",Hatidardagur:"0"},{Date:"2018-5-1T00:00.000Z",Name:"verkalýðsdagur",Hatidardagur:"1"},{Date:"2018-5-10T00:00.000Z",Name:"uppstigningardagur",Hatidardagur:"1"},{Date:"2018-5-13T00:00.000Z",Name:"mæðradagur",Hatidardagur:"0"},{Date:"2018-5-20T00:00.000Z",Name:"hvítasunnudagur",Hatidardagur:"1"},{Date:"2018-5-21T00:00.000Z",Name:"annar í hvítasunnu",Hatidardagur:"1"},{Date:"2018-6-3T00:00.000Z",Name:"sjómannadagur",Hatidardagur:"1"},{Date:"2018-6-17T00:00.000Z",Name:"þjóðhátíðardagurinn",Hatidardagur:"1"},{Date:"2018-6-24T00:00.000Z",Name:"jónsmessa",Hatidardagur:"0"},{Date:"2018-8-6T00:00.000Z",Name:"frídagur verslunarmanna",Hatidardagur:"1"},{Date:"2018-10-27T00:00.000Z",Name:"fyrsti vetrardagur",Hatidardagur:"0"},{Date:"2018-10-28T00:00.000Z",Name:"fyrsti vetrardagur",Hatidardagur:"0"},{Date:"2018-11-16T00:00.000Z",Name:"dagur íslenskrar tungu",Hatidardagur:"0"},{Date:"2018-12-1T00:00.000Z",Name:"fullveldisdagurinn",Hatidardagur:"0"},{Date:"2018-12-2T00:00.000Z",Name:"aðventa",Hatidardagur:"1"},{Date:"2018-12-23T00:00.000Z",Name:"þorláksmessa",Hatidardagur:"0"},{Date:"2018-12-24T00:00.000Z",Name:"aðfangadagur",Hatidardagur:"1"},{Date:"2018-12-25T00:00.000Z",Name:"jóladagur",Hatidardagur:"1"},{Date:"2018-12-26T00:00.000Z",Name:"annar í jólum",Hatidardagur:"1"},{Date:"2018-12-31T00:00.000Z",Name:"gamlársdagur",Hatidardagur:"1"}]
If you copy the output (line above) and paste it into this Online Json Viewer, you should see how the array looks like.
Example program on how to export all dates to a file which can be imported to Google Calendar.
Todo in next version: