Page 1 of 2

Date functions and programs

Posted: Mon May 26, 2014 8:33 am
by Dutchman
Due to bad weather and very limited internet-access during a three weeks holiday in France, I came home with the new folder 'Calendar' in my Smart Basic app.
I copied it to https://www.dropbox.com/sh/1xc3n6mrs4sk ... BqP7a?dl=0 on DropBox.

It contains a function library and application programs for calculating dates.

'date functions.txt' is the library with functions. Its usage is described in the preface.
'Date Functions Test.txt' contains several test functions used during development.

'Date Calculator.txt' is a program to calculate periods or dates after certain periods. Its usage is described in the preface of the program.

'IdenticalCalendar.txt' is a program which calculates in which year the calendar is identical to the calendar of the reference date set by the user.

'Party Calendar.txt' is a program which calculates remarkable dates for friends and family, with a list of anniversaries as reference, e.g. it calculates the date of a period of 1000 weeks after a birthday.
It requires the file 'anniversaries' which should contain lines with dates followed by a description of the particular event, e.g.
10-3-1940 John Smith, indicating the date that John Smith was born.
An example of such a list is given in 'anniversaries_example'.
You can copy and rename it to 'anniversaries' and adapt the content to your own dates of friends and family.
The result is written to file 'party calendar yyyy' in which yyyy stands for the year in which the remarkable dates will occur. That particular year is asked by the program.
If the output file already exists, then the program will ask whether it should be overwritten.
If it should not be overwritten, then the program writes the results to the clipboard and the user can then copy its contents into a file of its own choice.
The language which the program uses for certain text in the output file can be set with the variable 'Language': 1=English, 2=Dutch.
If Dutch is set as the language then the filenames are also in dutch:
'verjaardagen' for the input list of anniversaries and 'feestkalender yyyy' for the output file
Users are invited to add their own language ;-)
The language during run time is always english.
Certain debug switches can be set in the section before the main section.
These 'switches' were used during development.

Have fun,
Ton

Re: Date functions and programs

Posted: Mon May 26, 2014 9:24 am
by Фант
Привет,Dutchman! Спасибо!

Re: Date functions and programs

Posted: Mon May 26, 2014 9:50 am
by Dutchman
@ Фант
Получайте удовольствие, вы будете его использовать?

Re: Date functions and programs

Posted: Mon May 26, 2014 10:15 am
by Фант
Календари-моя любовь. Функции календаря я сделал в первую очередь при знакомстве с Smart BASIC. Обязательно посмотрю внимательнее и буду применять Ваши материалы! Спасибо!

Re: Date functions and programs

Posted: Mon May 26, 2014 11:01 am
by Фант
you are interested in football? See program: http://www.kibernetik.pro/forum/viewtop ... =21&t=555/
I can make a version in English.

Re: Date functions and programs

Posted: Mon May 26, 2014 12:26 pm
by Dutchman
No thank you, I am not interested in football.
I did see already your program. Again great graphics! :o
Are you graphics designer?

Re: Date functions and programs

Posted: Mon May 26, 2014 4:07 pm
by Фант
Спасибо! :) Нет! Я новичок и в программировании и в графике :roll: . Просто рисовать получается немного лучше :D

Re: Date functions and programs

Posted: Mon May 26, 2014 4:37 pm
by Dutchman
It is quite fantastic that we can have conversation in a language which I don't understand and an alphabet which is abracadabra for me. :D
Thanks to Google translate. I hope that it will not make terrible mistakes, which I certainly will not notice. :roll:

Re: Date functions and programs

Posted: Mon May 26, 2014 4:44 pm
by Фант
великолепно! :D я Вас отлично понимаю!

Re: Date functions and programs

Posted: Wed Jun 04, 2014 11:14 am
by Dutchman
The program 'Date Calculator' crashed if an increment was given without a correct character ('d', 'w' or 'm') at the end.
That error is solved and the file on Dropbox is updated.