Commit graph

31 commits

Author SHA1 Message Date
Petar Kapriš
f14ed81d81 Modify the julian package to use the GDate type
Up until now the julian package relied on the time.Time type to
represent Gregorian dates, and julian.Date to represent Julian dates,
however this both looks inconsistent, and is more opaque and complicated
because time.Time carries with it a lot of information we don't care
about.

Therefore this has been modified, now the conversion package has two
types julian.JDate and julian.GDate for their respective calendars.
2024-08-18 15:57:35 +02:00
Petar Kapriš
299832cb4b Add documentation for the julian package 2024-07-23 23:00:30 +02:00
Petar Kapriš
6f6b203c5b Add TimeToJDate with tests 2024-07-22 21:16:24 +02:00
Petar Kapriš
d862f6c35d Rename ToTime->JDateToTime 2024-07-22 21:15:20 +02:00
Petar Kapriš
001ac47315 Update module path to git.bonsai.cool/kayprish/ck 2024-07-21 00:36:02 +02:00
Petar Kapriš
cc6e52d352 Add tests for julian package 2024-07-21 00:28:25 +02:00
Petar Kapriš
bd5c9fe692 Add julian Date package with conversion to time.Time
The julian.Date type will be used within the project to support indexing
of holidays using the Julian calendar, Gregorian dates are implemented
by using time.Time (since it is already gregorian). Currently only
conversion Julian->Gregorian has been implemented, but the opposite will
be added soon.
2024-07-21 00:21:34 +02:00
Petar Kapriš
73fde0698c Add translation for UI message in source comments 2024-07-15 19:44:54 +02:00
Petar Kapriš
62c969b015 Add style for "red letter" days in drw/drw.go 2024-07-15 19:43:08 +02:00
Petar Kapriš
5574f20de8 add gitignore 2024-07-15 19:39:20 +02:00
Petar Kapriš
98dd500385 Bump golang to version 1.22 2024-07-15 19:34:04 +02:00
Petar Kapriš
da53b8c6b6 Move style definitions from Main.go to drw.go 2022-03-04 17:08:30 +01:00
Petar Kapriš
56fa219d2d Edit wall-movement functions in drw for clarity 2022-03-04 16:36:25 +01:00
Petar Kapriš
8d38a07348 Fix "December scrolling past current year" bug
Until this commit there was a bug which caused the current selected
year to change if the user 'L'-ed past the right of December, while
the number of months which can fit into one row did not divide 12.
2021-11-30 20:31:28 +01:00
Petar Kapriš
9fa8301ba6 Split project into several packages
The source code of the project has been split up into several packages,
each one pertaining to different aspects of the system. Currently there
is a main package, a drw package, containing all the funcitons
regarding the drawing of the calendar, and a util package containing
time-related project specific functions and general utility functions
for the project.
There are plenty of subsystems in the program which have not even been
developed yet, and new packages will be made pertaining to those. The
package tree may be heavily reorganized in the near future.
2021-11-30 20:14:45 +01:00
Petar Kapriš
1a194cc368 Make surrounding whitespace in centeredText the same style 2021-11-30 20:14:45 +01:00
Petar Kapriš
ce66ae9f21 Enable motion with HJKL keys
This commit will enable the user of the program to navigate the dates
within a given year, using vi-like keybindings. The movement between
months should act intuitively across different sizes of the terminal.
2021-11-30 19:58:46 +01:00
Petar Kapriš
394c8f9b9d Make monthsWide and monthsHigh global variables 2021-11-30 07:53:27 +01:00
Petar Kapriš
9dd937ad68 Enable marker for the current day in the calendar 2021-11-30 07:52:05 +01:00
Petar Kapriš
b99fbda938 Rename constant month{Height,Width} to maxMonth{Height,Width} 2021-11-30 07:48:51 +01:00
Petar Kapriš
72916575bd Reformat with gofmt 2021-09-04 11:50:23 +02:00
Petar Kapriš
66695e069b Enable screen resizing 2021-08-28 09:39:28 +02:00
Petar Kapriš
b7f2276d18 Add function drawWall() 2021-08-27 17:39:05 +02:00
Petar Kapriš
4d0c4c78a6 Add explanatory comment for monthHeight 2021-08-27 17:38:32 +02:00
Petar Kapriš
a7dbe96dc8 Add titleHeight 2021-08-27 17:37:38 +02:00
Petar Kapriš
0aa9e96ba3 Add largeGap 2021-08-27 12:10:31 +02:00
Petar Kapriš
7dd9ddd810 Rename gapSize to smallGap 2021-08-27 12:05:06 +02:00
Petar Kapriš
357757e479 Add function wrappedText 2021-08-25 18:33:47 +02:00
Petar Kapriš
593900c788 Add min function 2021-08-25 18:31:01 +02:00
Petar Kapriš
6e0b91f4f9 Remove unnecessary libraries 2021-07-21 09:36:46 +02:00
Petar Kapriš
e41bb4d8ae Initial commit 2021-07-20 23:22:07 +02:00