GCAL Command Line using

 

 

If GCAL is started without arguments, it will open window for user interface.

When GCAL is started with command line arguments, it will not show any window and will runs just for processing arguments and then exits.

 

Command line arguments

 

GCAL is used for few purposes, some of them are primary, some of them are secondary.

 

Calculation methods

 

Calculation of first day in Gaurabda year

Calculation of appearance data

Calculation of all sankrantis in common year

Calculation of vaisnava calendar for given period of time

Calculation of naksatra times for given period of time

Calculation of date for given naksatra

Calculation of tithis for given day

Calculation of date for given tithi (for range of years)

Calculation of next date for given tithi

 

Other functions

 

Exporting default language file.

 

Calculation Functions

 

This section deals with using of gcal program for calculation purposes.

 

firstday

appday

calendar

gcalendar

sankranti

naksatra

gnaksatra

tithi

gtithi

next

First day

 

gcal.exe firstday <latitude> <longitude> <year> <filename>

 

longitude - observators longitude on the earth

latitude - observators latitude

year - calculated year

filename - filename for XML output

 

EXAMPLES

 

gcal.exe firstday 47N23 21E15 2004 out1.xml

 

Into file OUT1.XML will write first day of Gaurabda year in the Gregorian epoch 2004.


 

Appearance Day

 

gcal.exe appday <latitude> <longitude> <timezone> <year> <month> <day> <hour> <minute> <filename> <dst>

 

longitude - observators longitude on the earth

latitude - observators latitude

tzone - time zone

year, month, day – date of event

hour, minute – time of event

filename - filename for XML output

dst - optional flag. accepted values are:  /dst:aus, /dst:eur, /dst:us

 

 

EXAMPLE

 

   gcal.exe appday 27S28 153E02 +10.0 2007 4 10 5 23 exp1.xml

 

This is calculation for Brisbane, Australia.

 

OUTPUT FILE EXP1.XML

 

<xml>

      <request name="AppDay">

            <arg name="longitude" value="+153.033333" />

            <arg name="latitude" value="-27.466667" />

            <arg name="timezone" value="+10.000000" />

            <arg name="year" value="2007" />

            <arg name="month" value="4" />

            <arg name="day" value="10" />

            <arg name="hour" value="5" />

            <arg name="minute" value="23" />

      </request>

      <result name="AppDay" >

            <tithi name="Saptami" elapse="50.477080" />

            <naksatra name="Purva-asadha" elapse="7.579771" pada="1"/>

            <paksa name="Krsna" />

            <masa name="Madhusudana" adhikamasa="no"/>

            <gaurabda value="521" />

            <celebrations>

                  <celebration gaurabda="521" day="10" month="4"

                        monthabr="Apr" year="2007" />

                  <celebration gaurabda="522" day="28" month="4"

                        monthabr="Apr" year="2008" />

                  <celebration gaurabda="523" day="17" month="4"

                        monthabr="Apr" year="2009" />

            </celebrations>

      </result>

</xml>

Sankranti

 

gcal.exe sankranti <latitude> <longitude> <timezone> <year> <filename>

 

longitude - observators longitude on the earth

latitude - observators latitude

timezone - time zone

year - calculated year

filename - filename for XML output

 

EXAMPLES

 

gcal.exe sankranti 48N14 13E04 2:00 2006 out2.xml

 

Into file OUT2.xml will write list of sankrantis for whole Gaurabda year begining in 2006.

 


 

Vaisnava Calendar

 

gcal.exe calendar <lat> <long> <tzone> <year> <month> <day> <count> <filename> <dst> <language>

 

 

long - observators longitude on the earth

lat - observators latitude

tzone - time zone

year, month, day – starting date

count - count of calculated days

filename - filename for XML output

dst - optional flag. accepted values are:  /dst:aus, /dst:eur, /dst:us

language – optional flag, see notes on Language Output.

 

Other way of calculation Vaisnava calendar is to use gcalendar.

 

gcal.exe gcalendar <lat> <long> <tzone> <year> <filename> <dst> <language>

 

 

long - observators longitude on the earth

lat - observators latitude

year - calculated year of Gregorian Calendar (1600...3999)

tzone - time zone

filename - filename for XML output

dst - optional flag. accepted values are:  /dst:aus, /dst:eur, /dst:us

language – optional flag, see notes on Language Output.

 

This will calculate fist day of Gaurabda year in given Gregorian Year and calculates whole Gaurabda year.

 

EXAMPLES

 

gcal.exe calendar 12N78 75E10 5.5 2007 2 1 365 out3.xml

 

Into file OUT3.XML will write calculated calendar for 365 days begining from 1st February 2007 for timezone 5 hours 30 minutes (= 5.5 hrs)

 

-------------

gcal.exe calendar 42N78 25E10 1.0 2007 2 1 365 out4.xml /dst:eur

 

Into file OUT4.XML will write calculated calendar for 365 days begining from 1st February 2007 for timezone 1 hour (= 1.0 hrs) with daylight saving time system for Europe.

 

-------------

gcal.exe calendar 12N78 75E10 5.5 2007 2 1 365 out5.xml /lang:ge

 

Into file OUT5.XML will write calculated calendar for 365 days begining from 1st February 2007 for timezone 5 hours 30 minutes (= 5.5 hrs). Text values will be in German Language (lang:ge refers to German language)

 

-------------

 

gcal.exe gcalendar 12N78 75E10 5.5 2007 temp1.xml /lang:hi

 

Into file TEMP1.XML will write calculated calendar from first day of Gaurabda year (in this case Mar 4, 2007) up to last day of that Gaurabda year (in this case up to Mar 21, 2008) for timezone 5 hours 30 minutes (= 5.5 hrs). Text values will be in Hindi Language (lang:hi refers to Hindi language)

 

 


 

Naksatra

 

There are two ways how to calculate naksatras. They differs only in arguments.

 

First way (date given in Gregorian Calendar)

 

  gcal.exe naksatra <lat> <long> <tzone> <year> <month> <day> <daycount> <fileout>

 

<lat> and <long> is latitude and longitude like for other cases.

tzone - timezone

year - range 1600..3999

month - range 1..12

day - range 1..31

daycount - range 1..5000

fileout – output filename

 

output: list of days with calculated naksatra timings

 

EXAMPLE

 

gcal.exe naksatra 12N78 75E10 5.5 2007 2 1 30 naks5.xml

 

 

Second way (date given in Gaurabda Calendar)

 

  gcal.exe gnaksatra <lat> <lon> <tzone> <gaurabdayear> <masa> <fileout>

 

long - observators longitude on the earth

lat - observators latitude

tzone - timezone

gaurabdayear - year of Gaurabda Era - range 0..2500

masa - range 1..12 or name e.g. Madhava, Govinda, visnu, hrsikesa, etc.

fileout – output filename

 

output: list od days with calculated naksatra timing for given Masa

 

EXAMPLE

 

gcal.exe gnaksatra 12N78 75E10 5.5 522 visnu temp6.xml

 

 


 

Tithis for Calendar date

 

  gcal.exe tithi <lat> <long> <tzone> <year> <month> <day> <fileout>

 

<lat> and <long> is latitude and longitude like for other cases.

tzone - timezone

year - range 1600..3999

month - range 1..12

day - range 1..31

fileout – output filename

 

output: calculated tithis which are touching given day

 

EXAMPLE

 

gcal.exe tithi 12N78 75E10 5.5 2007 2 1 temp7.xml

 

OUTPUT FILE TEMP7.XML

 

<xml>

      <request name="Tithi">

            <arg name="longitude" val="+75.16667" />

            <arg name="latitude" val="+13.30000" />

            <arg name="timezone" val="+5.50000" />

            <arg name="startdate" val="1 Feb 2007" />

      </request>

      <result name="Tithi">

            <tithi

                  id="28"

                  name="Caturdasi"

                  startdate="31 Jan 2007"

                  starttime="10:33:09"

/>

            <tithi

                  id="29"

                  name="Purnima"

                  startdate="1 Feb 2007"

                  starttime="10:40:11"

/>

      </result>

</xml>

Calendar Day for given Tithi

 

  gcal.exe gtithi <lat> <lon> <tzone> <year-range> <masa> <paksa> <tithi> <fileout>

 

year range - years of Gaurabda Era or Gregorian Era

masa - range 1..12 or name e.g. Madhava, Govinda, visnu, hrsikesa, etc.

paksa - range 0..1, or {k, K, krsna, Gaura, g, G, gaura}

tithi - range 1..15 or name e.g. pancami, Ekadasi, caturti, etc.

fileout – output filename

 

on input 2007:2009 means interval from 2007 upto 2009. Whether it is gaurabda year or calendar year, it depends on value. If value is lesser than 1500 then it is gaurabda year, if greater then it is gregorian calendar year.

 

example

meaning

520:524

interval for gaurabda years 520 - 524

2010-2012

interval for years 2010 to 2012

1998

just for one year (in this case 1998)

 

separator of years is either '-' or ':'

if other separator is used, then error is raised

 

output: calculated timings for given tithi

 

EXAMPLE

 

gcal.exe gtithi 27S28 153E02 +10.0 2007:2009 Madhusudana

K Trayodasi exp.xml

 

what is calculation for Brisbane, Australia

 

OUTPUT FILE

 

<xml>

      <request name="Tithi">

            <arg name="longitude" val="+153.03333" />

            <arg name="latitude" val="-27.46667" />

            <arg name="timezone" val="+10.00000" />

            <arg name="year-start" val="2007" />

            <arg name="year-end" val="2009" />

            <arg name="masa" val="0" />

            <arg name="paksa" val="0" />

            <arg name="tithi" val="12" />

      </request>

      <result name="Tithi">

      <celebration

            rtithi="Trayodasi"

            rmasa="Madhusudana"

            rpaksa="Krsna"

            type="ksaya"

            date="16 Apr 2007"

            otithi="Caturdasi"

            omasa="Madhusudana"

            opaksa="Krsna"

      />

      <celebration

            rtithi="Trayodasi"

            rmasa="Madhusudana"

            rpaksa="Krsna"

            type="ksaya"

            date="4 May 2008"

            otithi="Caturdasi"

            omasa="Madhusudana"

            opaksa="Krsna"

      />

      <celebration

            rtithi="Trayodasi"

            rmasa="Madhusudana"

            rpaksa="Krsna"

            type="normal"

            date="23 Apr 2009"

            otithi="Trayodasi"

            omasa="Madhusudana"

            opaksa="Krsna"

      />

      </result>

</xml>

 

rtithi, rmasa, rpaksa - input values of given vaisnava day

type - "ksaya" if tithi is ksaya, "normal" normal tithi, "vriddhi" if tithi is vriddhi

date - date of celebration

otithi, omasa, opaksa - actual vaisnava day for calculated date

 

There are values RTITHI and OTITHI (besides others) in the CELEBRATION tag.

Difference between OTITHI and RTITHI is when tithi is ksaya, then OTITHI is tithi after RTITHI and DATE is the day when this RTITHI occurs.

 

RTITHI like REQUESTED TITHI

OTITHI like OBSERVANCE TITHI


 

Next Celebration for given Tithi

 

gcal.exe next <latitude> <longitude> <timezone> <start-date> <masa> <paksa>

                   <tithi> <output-file>

 

longitude - observators longitude on the earth

latitude - observators latitude

timezone - timezone

masa - range 1..12 or name e.g. Madhava, Govinda, visnu, hrsikesa, etc.

paksa - range 0..1, or {k, K, krsna, Gaura, g, G, gaura}

tithi - range 1..15 or name e.g. pancami, Ekadasi, caturti, etc.

output-file – output filename

 

This command calculates the same output as GTITHI command, but only one date is calculated. GTITHI command calculates more observances of given tithi (depends on given range of years) but NEXT command calculates only one observance of given tithi. First instance of given tithi from given date.

 

In the case when given tithi falls on given starting date, then this date also its output value.

 

EXAMPLE

 

gcal.exe next 27S28 153E02 +10.0 25-12-2008 Narayana K Trayodasi exp2.xml

 

OUTPUT

 

<xml>

      <request name="Tithi">

            <arg name="longitude" val="+153.03333" />

            <arg name="latitude" val="-27.46667" />

            <arg name="timezone" val="+10.00000" />

            <arg name="start date" val="25 Dec 2008" />

            <arg name="masa" val="8" />

            <arg name="paksa" val="0" />

            <arg name="tithi" val="12" />

      </request>

      <result name="Tithi">

      <celebration

            rtithi="Trayodasi"

            rmasa="Narayana"

            rpaksa="Krsna"

            type="normal"

            date="25 Dec 2008"

            otithi="Trayodasi"

            omasa="Narayana"

            opaksa="Krsna"

      />

      </result>

</xml>

 

 

Meaning of tags and attributes are the same as for GTITHI command.

 

rtithi, rmasa, rpaksa - input values of given vaisnava day

type - "ksaya" if tithi is ksaya, "normal" normal tithi, "vriddhi" if tithi is vriddhi

date - date of celebration

otithi, omasa, opaksa - actual vaisnava day for calculated date

 

There are values RTITHI and OTITHI (besides others) in the CELEBRATION tag.

Difference between OTITHI and RTITHI is when tithi is ksaya, then OTITHI is tithi after RTITHI and DATE is the day when this RTITHI occurs.

 

RTITHI like REQUESTED TITHI

OTITHI like OBSERVANCE TITHI

 


 

NOTES:

 

longitude can be given in these forms

 

47E80    equal 47 deg 80 arcmin East

40.25    equal 40 deg 15 arcmin East

16.3333  equal 16 deg 20 arcmin West

 

 

latitude can be given in these forms

 

15N30   equal 15 deg 30 arcmin North

46.50  equal 46 deg 30 arcmin South

 

timezone can be given in these forms

 

5:30   equal 5 hours 30 mins

2.5    equal 2 hours 30 mins

W7.75  equal -7 hours 45 mins

E5.5 equal +5 hours 30 mins

 

Western Timezones are negative values but command line does not allow using 'minus' character before number because Windows is using minus for flags. Therefore W is used for negative (western) time zones and E is used for positive (eastern) time zones.

 

(separator : means time in HH:MM format,

separator . means time in floating point format)

 

Filename

 

Filename can be typed in two ways (a) with quotes, (          b) without quotes.

 

With Quotes

 

"testTithi.xml"

This is OK.

 

"test for first time.xml"

Quotes are necesary, because filename must be one string. Otherwise Windows will misinterpret arguments for program. So, for instance gcal.exe calendar 10n00 11e20 10:30 2008 2 5 10 test first time.xml /dst:aus will be misinterpretted filename. Filename in this case will be test and rest of arguments will be not accepted (except /dst flag, that is accepted wherever in arguments). This is right form (with quotes): gcal.exe calendar 10n00 11e20 10:30 2008 2 5 10 "test first time.xml" /dst:aus

 

Without Quotes

If there is no space characters in the file name, then filename is not neccessary involve into quotes. These filenames are accepted as one string.

 

test.xml

test_2.xml

incl\test3.xml

c:\data\test4.xml

 

but quotes are required when ...

 

"test 5.xml"

"c:\My Documents\test 6.xml"

 

Language output

 

GCAL offers possibility for modifying language in which output text is given. Regarding XML file, only text values are in given language.

 

Language strings are stored in files with LNG extension. These files are in the same directory as GCAL program. Each file defines only one language. Besides other information, language file contains two strings: Language Name and Language Identificator. Language name is for instance: English, English (Australia), German, Dutch, Hungary, Slovensky, etc. Language identificator is short string which uniquely identifies language file. For English it will be en, or for Germany it will be ge, etc.

 

These two strings are defined by creator of language file so identificator for Germany could be also yye, but for easy indentification for user, language identificator should be like acronym of language name.

 

Default language is English so there is no need to give argument like /lang:en.

 


 

Other functions

 

Exporting default language file

 

Default language file is stored in application itself. It can be exported (and thus translated into another language) by argument line:

 

     gcal.exe export-deflang

 

This is create new file in the application directory.

 

 

 

Revision History

 

DATE

CHANGE / UPDATE

April 20, 2008

Changed notation for timezone values. Added flag DST for gcalendar.

Feb 18, 2008

Changed behaviour of GTITHI command. Added command NEXT. Added example file for APPDAY and TITHI commands.

Jan 5, 2008

Description of right typing of the filename. Added arguments for appday (calculation of Appearance Day).

Jan 1, 2008

Added arguments for gcalendar, export-deflang

July 7, 2007

First version. Arguments sankranti, gtithi, tithi, naksatra, gnaksatra, calendar, firstday

 

 

 

 

 

Other information available from

gopalapriya.bvs@pamho.net