Linux(Gcal).Pdf
Total Page:16
File Type:pdf, Size:1020Kb
Gcal Gcal An Extended Calendar Program Edition 3.01 June 2000 by Thomas Esken Copyright c 1994, 95, 96, 1997, 2000 Thomas Esken Any suggestions, improvements, extensions, bug reports, donations, proposals for contract work, ¨ and so forth are welcome! Please send them directly to my eMail address [email protected]. If you like my work, I’d appreciate a postcard from you! ------------------------oOO \\\_’’/ OOo--------------------------- Thomas Esken O (/o-o\) O eMail: [email protected] Im Hagenfeld 84 (( ^ )) Phone: +49 251 232585 D-48147 Muenster; Germany \____) ~ (____/ MotD : 2old2live, 2young2die © This is Edition 3.01 of Gcal, an Extended Calendar Program, for the 3.01 (or later) version of the GNU implementation of cal and calendar. Permission is granted to make and distribute verbatim copies of this manual provided the copy- right notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the condi- tions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. i Short Contents 1 Preface ................................................... 1 2 Gcal Introduction ........................................... 5 3 Invoking gcal .............................................. 7 4 Eternal Holidays ........................................... 73 5 Fixed Dates............................................... 75 A Genesis of the Gregorian Calendar .............................. 117 B Gcal Utilities ............................................. 119 C Aspects in Internationalization ................................. 123 D Metasymbols ............................................. 127 E Regular Expressions ........................................ 129 F Summary of all Regular Expressions ............................. 135 G %? . Special Texts ........................................ 137 H Summary of all %? . Special Texts ............................. 197 I Obsolete Special Texts and Format Elements ....................... 227 J Format Instruction ......................................... 231 K Coding Scheme............................................ 233 L Environment Variables ...................................... 237 M Error Codes .............................................. 239 N Glossary ................................................ 241 Command Line Argument Index ................................... 253 Environment Variable Index ...................................... 257 Table Index ................................................. 259 Concept Index ............................................... 261 ii Gcal 3.01 iii Table of Contents 1 Preface ................................................ 1 2 Gcal Introduction ...................................... 5 3 Invoking gcal .......................................... 7 3.1 Command line arguments ...................................................... 8 3.1.1 Options .................................................................. 9 3.1.1.1 Common options .................................................... 10 3.1.1.2 Global options ...................................................... 10 3.1.1.3 Calendar options .................................................... 14 3.1.1.4 Fixed date options .................................................. 34 3.1.2 Response file ............................................................ 60 3.1.3 Actual date modifier ..................................................... 62 3.1.4 Commands .............................................................. 67 3.1.4.1 Single commands .................................................... 67 3.1.4.2 3-Month mode commands ............................................ 68 3.1.4.3 Lists of commands .................................................. 69 3.1.4.4 Ranges of commands ................................................ 69 3.2 The GCAL environment variable ................................................ 71 4 Eternal Holidays ...................................... 73 5 Fixed Dates........................................... 75 5.1 Resource file ................................................................. 77 5.1.1 Structure of resource file.................................................. 79 5.1.2 Date part of a line ....................................................... 81 5.1.3 Further date part attributes .............................................. 84 5.1.3.1 Lists of days ........................................................ 84 5.1.3.2 Ranges of days ...................................................... 85 5.1.3.3 Repetition factor of days ............................................. 87 5.1.3.4 Appearance factor of days............................................ 88 5.1.4 Text part of a line ....................................................... 91 5.1.5 %? . Special Texts...................................................... 94 5.1.6 Comment line ........................................................... 95 5.1.7 Include directives ........................................................ 96 5.1.8 Date variables ........................................................... 97 5.1.9 Text variables .......................................................... 100 5.2 Resource file examples ....................................................... 107 Appendix A Genesis of the Gregorian Calendar ......... 117 Appendix B Gcal Utilities ............................. 119 B.1 Invoking tcal .............................................................. 119 B.2 Invoking txt2gcal .......................................................... 119 B.3 Invoking gcal2txt .......................................................... 120 iv Gcal 3.01 Appendix C Aspects in Internationalization ............. 123 Appendix D Metasymbols.............................. 127 Appendix E Regular Expressions ....................... 129 E.1 How to Use Regular Expressions ............................................. 129 E.2 Regular Expression Operators................................................ 129 Appendix F Summary of all Regular Expressions........ 135 Appendix G %? . Special Texts ....................... 137 G.1 %? . special texts for date exclusion ........................................ 137 G.1.1 Exclusions with date argument %?[date] special texts ..................... 138 G.1.1.1 Inclusive date period %i[date][#[date]] special text................... 138 G.1.1.2 Exclusive date period %e[date][#[date]] special text .................. 139 G.1.2 Exclusions without any argument %? special texts ........................ 140 G.1.2.1 Inclusive day period %? special texts ................................ 140 G.1.2.2 Exclusive day period %? special texts................................ 141 G.2 %? . special texts for text replacement ...................................... 141 G.2.1 Replacements with date argument %?[date] special texts .................. 141 G.2.1.1 Weekday name %[format]K[date] special text ........................ 142 G.2.1.2 Weekday number %[format]?[date] special texts ..................... 142 G.2.1.3 Day-of-year number %[format]N[date] special text.................... 144 G.2.1.4 Day number %[format]D[date] special text........................... 144 G.2.1.5 Week number %k[date] special text ................................. 145 G.2.1.6 Month name %[format]U[date] special text .......................... 145 G.2.1.7 Month number %[format]M[date] special text ........................ 145 G.2.1.8 Year number %[format]Y[date] special text .......................... 146 G.2.1.9 Moon phase %[format]?[date] special texts .......................... 146 G.2.1.10 Biorhythm %?[date] special texts .................................. 147 G.2.1.11 Difference value %[format]?[date] special texts ..................... 148 G.2.2 Replacements with other argument %[format]?[argument] special texts..... 149 G.2.2.1 Actual clocktime %[format]?[argument] special texts ................. 149 G.2.2.2 Textual date %n[argument] special text .............................. 152 G.2.2.3 Julian day number %[format]j[argument] special text ................ 152 G.2.2.4 Geographical distance and course angle %[format]bargument special text ....................................................................... 152 G.2.2.5 Sun data %[format]?argument special texts ......................... 155 G.2.2.6 Moon data %[format]?argument special texts........................ 176 G.2.2.7 Environment variable %[format]-[argument] special text.............. 191 G.2.3 Replacements without any argument %? special texts ..................... 192 G.2.3.1 Difference value %[format]? special texts ............................ 192 G.2.3.2 Highlighting %? special texts ....................................... 193 G.3 Shell command %![argument] special text..................................... 195 Appendix H Summary of all %? . Special Texts ........ 197 Appendix I Obsolete Special Texts and Format Elements .................................................... 227 I.1 Table of Obsolete Special Texts ............................................... 228 I.2 Table of Obsolete Date Format Elements ...................................... 229 I.3 Table