summaryrefslogtreecommitdiffstats
path: root/testpar/t_mdset.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:26:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:26:20 (GMT)
commit427ff7da2848042f68ecfadf5a321b1d8077e9db (patch)
tree73024b1954031fbb724c2d96a485590348e5cc22 /testpar/t_mdset.c
parent9b96fd2003ae74cca389cc4c2216b4371d6eb173 (diff)
downloadhdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.zip
hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.gz
hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.bz2
[svn-r9727] Purpose:
Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-) Description: Generally speaking, this is the "signed->unsigned" change to selections. However, in the process of merging code back, things got stickier and stickier until I ended up doing a big "sync the two branches up" operation. So... I brought back all the "infrastructure" fixes from the development branch to the release branch (which I think were actually making some improvement in performance) as well as fixed several bugs which had been fixed in one branch, but not the other. I've also tagged the repository before making this checkin with the label "before_signed_unsigned_changes". Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel & fphdf5 FreeBSD 4.10 (sleipnir) w/threadsafe FreeBSD 4.10 (sleipnir) w/backward compatibility Solaris 2.7 (arabica) w/"purify options" Solaris 2.8 (sol) w/FORTRAN & C++ AIX 5.x (copper) w/parallel & FORTRAN IRIX64 6.5 (modi4) w/FORTRAN Linux 2.4 (heping) w/FORTRAN & C++ Misc. update:
Diffstat (limited to 'testpar/t_mdset.c')
-rw-r--r--testpar/t_mdset.c73
1 files changed, 36 insertions, 37 deletions
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index b23a26e..06aedf3 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -30,7 +30,7 @@ void group_dataset_read(hid_t fid, int mpi_rank, int m);
void write_attribute(hid_t, int, int);
int read_attribute(hid_t, int, int);
int check_value(DATATYPE *, DATATYPE *, int);
-void get_slab(hssize_t[], hsize_t[], hsize_t[], hsize_t[], int);
+void get_slab(hsize_t[], hsize_t[], hsize_t[], hsize_t[], int);
/*
@@ -87,18 +87,18 @@ void multiple_dset_write(void)
hid_t iof, plist, dataset, memspace, filespace;
hid_t dcpl; /* Dataset creation property list */
hbool_t use_gpfs = FALSE; /* Use GPFS hints */
- hssize_t chunk_origin [DIM];
+ hsize_t chunk_origin [DIM];
hsize_t chunk_dims [DIM], file_dims [DIM];
hsize_t count[DIM]={1,1};
double * outme = NULL;
double fill=1.0; /* Fill value */
char dname [100];
herr_t ret;
- H5Ptest_param_t *pt;
+ const H5Ptest_param_t *pt;
char *filename;
int ndatasets;
- pt = (H5Ptest_param_t *) GetTestParameters();
+ pt = GetTestParameters();
filename = pt->name;
ndatasets = pt->count;
@@ -180,7 +180,7 @@ void compact_dataset(void)
double * inme;
char dname[]="dataset";
herr_t ret;
- char *filename;
+ const char *filename;
size = get_size();
@@ -198,7 +198,7 @@ void compact_dataset(void)
inme = HDmalloc((size_t)(size * size * sizeof(double)));
VRFY((outme != NULL), "HDmalloc succeeded for inme");
- filename = (char *) GetTestParameters();
+ filename = GetTestParameters();
VRFY((mpi_size <= size), "mpi_size <= size");
plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs);
@@ -293,12 +293,12 @@ void null_dataset(void)
char dname[]="dataset";
char attr_name[]="attribute";
herr_t ret;
- char *filename;
+ const char *filename;
MPI_Comm_rank (MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size (MPI_COMM_WORLD, &mpi_size);
- filename = (char *) GetTestParameters();
+ filename = GetTestParameters();
plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL,
facc_type, use_gpfs);
@@ -398,7 +398,7 @@ void big_dataset(void)
char dname[]="dataset"; /* Name of dataset */
MPI_Offset file_size; /* Size of file on disk */
herr_t ret; /* Generic return value */
- char *filename;
+ const char *filename;
MPI_Comm_rank (MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size (MPI_COMM_WORLD, &mpi_size);
@@ -406,7 +406,7 @@ void big_dataset(void)
/* Verify MPI_Offset can handle larger than 2GB sizes */
VRFY((sizeof(MPI_Offset)>4), "sizeof(MPI_Offset)>4");
- filename = (char *) GetTestParameters();
+ filename = GetTestParameters();
fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs);
VRFY((fapl >= 0), "create_faccess_plist succeeded");
@@ -530,19 +530,19 @@ void dataset_fillvalue(void)
filespace; /* Dataset's dataspace ID */
char dname[]="dataset"; /* Name of dataset */
hsize_t dset_dims[4] = {0, 6, 7, 8};
- hssize_t req_start[4] = {0, 0, 0, 0};
+ hsize_t req_start[4] = {0, 0, 0, 0};
hsize_t req_count[4] = {1, 6, 7, 8};
hsize_t dset_size; /* Dataset size */
int *rdata, *wdata; /* Buffers for data to read and write */
int *twdata, *trdata; /* Temporary pointer into buffer */
int acc, i, j, k, l; /* Local index variables */
herr_t ret; /* Generic return value */
- char *filename;
+ const char *filename;
MPI_Comm_rank (MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size (MPI_COMM_WORLD, &mpi_size);
- filename = (char *) GetTestParameters();
+ filename = GetTestParameters();
/* Set the dataset dimension to be one row more than number of processes */
/* and calculate the actual dataset size. */
@@ -710,15 +710,15 @@ void collective_group_write(void)
char gname[64], dname[32];
hid_t fid, gid, did, plist, dcpl, memspace, filespace;
DATATYPE * outme = NULL;
- hssize_t chunk_origin[DIM];
+ hsize_t chunk_origin[DIM];
hsize_t chunk_dims[DIM], file_dims[DIM], count[DIM];
hsize_t chunk_size[2]; /* Chunk dimensions - computed shortly */
herr_t ret1, ret2;
- H5Ptest_param_t *pt;
+ const H5Ptest_param_t *pt;
char *filename;
int ngroups;
- pt = (H5Ptest_param_t *) GetTestParameters();
+ pt = GetTestParameters();
filename = pt->name;
ngroups = pt->count;
@@ -803,11 +803,11 @@ void independent_group_read(void)
int mpi_rank, m;
hid_t plist, fid;
hbool_t use_gpfs = FALSE;
- H5Ptest_param_t *pt;
+ const H5Ptest_param_t *pt;
char *filename;
int ngroups;
- pt = (H5Ptest_param_t *) GetTestParameters();
+ pt = GetTestParameters();
filename = pt->name;
ngroups = pt->count;
@@ -927,14 +927,14 @@ void multiple_group_write(void)
hbool_t use_gpfs = FALSE;
char gname[64];
hid_t fid, gid, plist, memspace, filespace;
- hssize_t chunk_origin[DIM];
+ hsize_t chunk_origin[DIM];
hsize_t chunk_dims[DIM], file_dims[DIM], count[DIM];
herr_t ret;
- H5Ptest_param_t *pt;
+ const H5Ptest_param_t *pt;
char *filename;
int ngroups;
- pt = (H5Ptest_param_t *) GetTestParameters();
+ pt = GetTestParameters();
filename = pt->name;
ngroups = pt->count;
@@ -1098,13 +1098,13 @@ void multiple_group_read(void)
hbool_t use_gpfs = FALSE;
char gname[64];
hid_t plist, fid, gid, memspace, filespace;
- hssize_t chunk_origin[DIM];
+ hsize_t chunk_origin[DIM];
hsize_t chunk_dims[DIM], file_dims[DIM], count[DIM];
- H5Ptest_param_t *pt;
+ const H5Ptest_param_t *pt;
char *filename;
int ngroups;
- pt = (H5Ptest_param_t *) GetTestParameters();
+ pt = GetTestParameters();
filename = pt->name;
ngroups = pt->count;
@@ -1335,7 +1335,7 @@ int check_value(DATATYPE *indata, DATATYPE *outdata, int size)
{
int mpi_rank, mpi_size, err_num=0;
hsize_t i, j;
- hssize_t chunk_origin[DIM];
+ hsize_t chunk_origin[DIM];
hsize_t chunk_dims[DIM], count[DIM];
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
@@ -1349,7 +1349,7 @@ int check_value(DATATYPE *indata, DATATYPE *outdata, int size)
for(j=chunk_origin[1]; j<(chunk_origin[1]+chunk_dims[1]); j++) {
if( *indata != *outdata )
if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- printf("Dataset Verify failed at [%ld][%ld](row %ld, col%ld): expect %d, got %d\n", (long)i, (long)j, (long)i, (long)j, *outdata, *indata);
+ printf("Dataset Verify failed at [%lu][%lu](row %lu, col%lu): expect %d, got %d\n", (unsigned long)i, (unsigned long)j, (unsigned long)i, (unsigned long)j, *outdata, *indata);
}
if(err_num > MAX_ERR_REPORT && !VERBOSE_MED)
printf("[more errors ...]\n");
@@ -1367,7 +1367,7 @@ int check_value(DATATYPE *indata, DATATYPE *outdata, int size)
* JRM - 8/11/04
*/
-void get_slab(hssize_t chunk_origin[],
+void get_slab(hsize_t chunk_origin[],
hsize_t chunk_dims[],
hsize_t count[],
hsize_t file_dims[],
@@ -1429,13 +1429,12 @@ void io_mode_confusion(void)
/* identifiers */
hsize_t dimsf[1]; /* dataset dimensions */
int data[N] = {1}; /* pointer to data buffer to write */
- hssize_t select[N] = {0L,1L,2L,3L};
- hssize_t start[1];
- hsize_t stride[1];
- hsize_t count[1];
- hsize_t block[1];
+ hsize_t coord[N] = {0L,1L,2L,3L};
+ hsize_t start[1];
+ hsize_t stride[1];
+ hsize_t count[1];
+ hsize_t block[1];
hid_t plist_id; /* property list identifier */
- int i;
herr_t status;
@@ -1450,13 +1449,13 @@ void io_mode_confusion(void)
* test bed related variables
*/
- char * fcn_name = "io_mode_confusion";
+ const char * fcn_name = "io_mode_confusion";
const hbool_t verbose = FALSE;
- H5Ptest_param_t * pt;
+ const H5Ptest_param_t * pt;
char * filename;
- pt = (H5Ptest_param_t *) GetTestParameters();
+ pt = GetTestParameters();
filename = pt->name;
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
@@ -1592,7 +1591,7 @@ void io_mode_confusion(void)
mpi_rank, fcn_name);
status = H5Sselect_elements(filespace, H5S_SELECT_SET, N,
- (const hssize_t **)&select);
+ (const hsize_t **)&coord);
VRFY(( status >= 0 ), "H5Sselect_elements() failed");
/GMT+11 | 5 + library/tzdata/Etc/GMT+12 | 5 + library/tzdata/Etc/GMT+2 | 5 + library/tzdata/Etc/GMT+3 | 5 + library/tzdata/Etc/GMT+4 | 5 + library/tzdata/Etc/GMT+5 | 5 + library/tzdata/Etc/GMT+6 | 5 + library/tzdata/Etc/GMT+7 | 5 + library/tzdata/Etc/GMT+8 | 5 + library/tzdata/Etc/GMT+9 | 5 + library/tzdata/Etc/GMT-0 | 5 + library/tzdata/Etc/GMT-1 | 5 + library/tzdata/Etc/GMT-10 | 5 + library/tzdata/Etc/GMT-11 | 5 + library/tzdata/Etc/GMT-12 | 5 + library/tzdata/Etc/GMT-13 | 5 + library/tzdata/Etc/GMT-14 | 5 + library/tzdata/Etc/GMT-2 | 5 + library/tzdata/Etc/GMT-3 | 5 + library/tzdata/Etc/GMT-4 | 5 + library/tzdata/Etc/GMT-5 | 5 + library/tzdata/Etc/GMT-6 | 5 + library/tzdata/Etc/GMT-7 | 5 + library/tzdata/Etc/GMT-8 | 5 + library/tzdata/Etc/GMT-9 | 5 + library/tzdata/Etc/GMT0 | 5 + library/tzdata/Etc/Greenwich | 5 + library/tzdata/Etc/UCT | 5 + library/tzdata/Etc/UTC | 5 + library/tzdata/Etc/Universal | 5 + library/tzdata/Etc/Zulu | 5 + library/tzdata/Europe/Amsterdam | 311 + library/tzdata/Europe/Andorra | 237 + library/tzdata/Europe/Athens | 268 + library/tzdata/Europe/Belfast | 372 + library/tzdata/Europe/Belgrade | 249 + library/tzdata/Europe/Berlin | 274 + library/tzdata/Europe/Bratislava | 5 + library/tzdata/Europe/Brussels | 316 + library/tzdata/Europe/Bucharest | 268 + library/tzdata/Europe/Budapest | 283 + library/tzdata/Europe/Chisinau | 272 + library/tzdata/Europe/Copenhagen | 265 + library/tzdata/Europe/Dublin | 359 + library/tzdata/Europe/Gibraltar | 328 + library/tzdata/Europe/Helsinki | 248 + library/tzdata/Europe/Istanbul | 304 + library/tzdata/Europe/Kaliningrad | 260 + library/tzdata/Europe/Kiev | 251 + library/tzdata/Europe/Lisbon | 351 + library/tzdata/Europe/Ljubljana | 5 + library/tzdata/Europe/London | 372 + library/tzdata/Europe/Luxembourg | 313 + library/tzdata/Europe/Madrid | 294 + library/tzdata/Europe/Malta | 300 + library/tzdata/Europe/Mariehamn | 5 + library/tzdata/Europe/Minsk | 251 + library/tzdata/Europe/Monaco | 315 + library/tzdata/Europe/Moscow | 259 + library/tzdata/Europe/Nicosia | 5 + library/tzdata/Europe/Oslo | 272 + library/tzdata/Europe/Paris | 314 + library/tzdata/Europe/Prague | 272 + library/tzdata/Europe/Riga | 258 + library/tzdata/Europe/Rome | 301 + library/tzdata/Europe/Samara | 245 + library/tzdata/Europe/San_Marino | 5 + library/tzdata/Europe/Sarajevo | 5 + library/tzdata/Europe/Simferopol | 253 + library/tzdata/Europe/Skopje | 5 + library/tzdata/Europe/Sofia | 259 + library/tzdata/Europe/Stockholm | 250 + library/tzdata/Europe/Tallinn | 255 + library/tzdata/Europe/Tirane | 263 + library/tzdata/Europe/Tiraspol | 5 + library/tzdata/Europe/Uzhgorod | 254 + library/tzdata/Europe/Vaduz | 245 + library/tzdata/Europe/Vatican | 5 + library/tzdata/Europe/Vienna | 271 + library/tzdata/Europe/Vilnius | 251 + library/tzdata/Europe/Warsaw | 294 + library/tzdata/Europe/Zagreb | 5 + library/tzdata/Europe/Zaporozhye | 252 + library/tzdata/Europe/Zurich | 252 + library/tzdata/GB | 5 + library/tzdata/GB-Eire | 5 + library/tzdata/GMT | 5 + library/tzdata/GMT+0 | 5 + library/tzdata/GMT-0 | 5 + library/tzdata/GMT0 | 5 + library/tzdata/Greenwich | 5 + library/tzdata/HST | 5 + library/tzdata/Hongkong | 5 + library/tzdata/Iceland | 5 + library/tzdata/Indian/Antananarivo | 8 + library/tzdata/Indian/Chagos | 6 + library/tzdata/Indian/Christmas | 6 + library/tzdata/Indian/Cocos | 5 + library/tzdata/Indian/Comoro | 6 + library/tzdata/Indian/Kerguelen | 6 + library/tzdata/Indian/Mahe | 6 + library/tzdata/Indian/Maldives | 7 + library/tzdata/Indian/Mauritius | 6 + library/tzdata/Indian/Mayotte | 6 + library/tzdata/Indian/Reunion | 6 + library/tzdata/Iran | 5 + library/tzdata/Israel | 5 + library/tzdata/Jamaica | 5 + library/tzdata/Japan | 5 + library/tzdata/Kwajalein | 5 + library/tzdata/Libya | 5 + library/tzdata/MET | 263 + library/tzdata/MST | 5 + library/tzdata/MST7MDT | 5 + library/tzdata/Mexico/BajaNorte | 5 + library/tzdata/Mexico/BajaSur | 5 + library/tzdata/Mexico/General | 5 + library/tzdata/NZ | 5 + library/tzdata/NZ-CHAT | 5 + library/tzdata/Navajo | 5 + library/tzdata/PRC | 5 + library/tzdata/PST8PDT | 5 + library/tzdata/Pacific/Apia | 8 + library/tzdata/Pacific/Auckland | 285 + library/tzdata/Pacific/Chatham | 257 + library/tzdata/Pacific/Easter | 275 + library/tzdata/Pacific/Efate | 26 + library/tzdata/Pacific/Enderbury | 8 + library/tzdata/Pacific/Fakaofo | 6 + library/tzdata/Pacific/Fiji | 10 + library/tzdata/Pacific/Funafuti | 6 + library/tzdata/Pacific/Galapagos | 7 + library/tzdata/Pacific/Gambier | 6 + library/tzdata/Pacific/Guadalcanal | 6 + library/tzdata/Pacific/Guam | 8 + library/tzdata/Pacific/Honolulu | 12 + library/tzdata/Pacific/Johnston | 5 + library/tzdata/Pacific/Kiritimati | 8 + library/tzdata/Pacific/Kosrae | 8 + library/tzdata/Pacific/Kwajalein | 8 + library/tzdata/Pacific/Majuro | 7 + library/tzdata/Pacific/Marquesas | 6 + library/tzdata/Pacific/Midway | 10 + library/tzdata/Pacific/Nauru | 9 + library/tzdata/Pacific/Niue | 8 + library/tzdata/Pacific/Norfolk | 7 + library/tzdata/Pacific/Noumea | 12 + library/tzdata/Pacific/Pago_Pago | 10 + library/tzdata/Pacific/Palau | 6 + library/tzdata/Pacific/Pitcairn | 7 + library/tzdata/Pacific/Ponape | 6 + library/tzdata/Pacific/Port_Moresby | 7 + library/tzdata/Pacific/Rarotonga | 32 + library/tzdata/Pacific/Saipan | 9 + library/tzdata/Pacific/Samoa | 5 + library/tzdata/Pacific/Tahiti | 6 + library/tzdata/Pacific/Tarawa | 6 + library/tzdata/Pacific/Tongatapu | 14 + library/tzdata/Pacific/Truk | 6 + library/tzdata/Pacific/Wake | 6 + library/tzdata/Pacific/Wallis | 6 + library/tzdata/Pacific/Yap | 7 + library/tzdata/Poland | 5 + library/tzdata/Portugal | 5 + library/tzdata/ROC | 5 + library/tzdata/ROK | 5 + library/tzdata/Singapore | 5 + library/tzdata/SystemV/AST4 | 5 + library/tzdata/SystemV/AST4ADT | 5 + library/tzdata/SystemV/CST6 | 5 + library/tzdata/SystemV/CST6CDT | 5 + library/tzdata/SystemV/EST5 | 5 + library/tzdata/SystemV/EST5EDT | 5 + library/tzdata/SystemV/HST10 | 5 + library/tzdata/SystemV/MST7 | 5 + library/tzdata/SystemV/MST7MDT | 5 + library/tzdata/SystemV/PST8 | 5 + library/tzdata/SystemV/PST8PDT | 5 + library/tzdata/SystemV/YST9 | 5 + library/tzdata/SystemV/YST9YDT | 5 + library/tzdata/Turkey | 5 + library/tzdata/UCT | 5 + library/tzdata/US/Alaska | 5 + library/tzdata/US/Aleutian | 5 + library/tzdata/US/Arizona | 5 + library/tzdata/US/Central | 5 + library/tzdata/US/East-Indiana | 5 + library/tzdata/US/Eastern | 5 + library/tzdata/US/Hawaii | 5 + library/tzdata/US/Indiana-Starke | 5 + library/tzdata/US/Michigan | 5 + library/tzdata/US/Mountain | 5 + library/tzdata/US/Pacific | 5 + library/tzdata/US/Pacific-New | 5 + library/tzdata/US/Samoa | 5 + library/tzdata/UTC | 5 + library/tzdata/Universal | 5 + library/tzdata/W-SU | 5 + library/tzdata/WET | 251 + library/tzdata/Zulu | 5 + tests/clock.test | 35325 +++++++++++++++++++++- tests/interp.test | 8 +- tests/safe.test | 8 +- tools/installData.tcl | 53 + tools/loadICU.tcl | 622 + tools/makeTestCases.tcl | 1154 + tools/tclZIC.tcl | 1440 + unix/Makefile.in | 20 +- unix/configure | 3 +- unix/tcl.m4 | 2 +- 690 files changed, 93971 insertions(+), 974 deletions(-) create mode 100644 library/clock.tcl create mode 100755 library/msgs/af.msg create mode 100755 library/msgs/af_ZA.msg create mode 100755 library/msgs/ar.msg create mode 100755 library/msgs/ar_IN.msg create mode 100755 library/msgs/ar_JO.msg create mode 100755 library/msgs/ar_LB.msg create mode 100755 library/msgs/ar_SY.msg create mode 100755 library/msgs/be.msg create mode 100755 library/msgs/bg.msg create mode 100755 library/msgs/bn.msg create mode 100755 library/msgs/bn_IN.msg create mode 100755 library/msgs/ca.msg create mode 100755 library/msgs/cs.msg create mode 100755 library/msgs/da.msg create mode 100755 library/msgs/de.msg create mode 100755 library/msgs/de_AT.msg create mode 100755 library/msgs/de_BE.msg create mode 100755 library/msgs/el.msg create mode 100755 library/msgs/en_AU.msg create mode 100755 library/msgs/en_BE.msg create mode 100755 library/msgs/en_BW.msg create mode 100755 library/msgs/en_CA.msg create mode 100755 library/msgs/en_GB.msg create mode 100755 library/msgs/en_HK.msg create mode 100755 library/msgs/en_IE.msg create mode 100755 library/msgs/en_IN.msg create mode 100755 library/msgs/en_NZ.msg create mode 100755 library/msgs/en_PH.msg create mode 100755 library/msgs/en_SG.msg create mode 100755 library/msgs/en_ZA.msg create mode 100755 library/msgs/en_ZW.msg create mode 100755 library/msgs/eo.msg create mode 100755 library/msgs/es.msg create mode 100755 library/msgs/es_AR.msg create mode 100755 library/msgs/es_BO.msg create mode 100755 library/msgs/es_CL.msg create mode 100755 library/msgs/es_CO.msg create mode 100755 library/msgs/es_CR.msg create mode 100755 library/msgs/es_DO.msg create mode 100755 library/msgs/es_EC.msg create mode 100755 library/msgs/es_GT.msg create mode 100755 library/msgs/es_HN.msg create mode 100755 library/msgs/es_MX.msg create mode 100755 library/msgs/es_NI.msg create mode 100755 library/msgs/es_PA.msg create mode 100755 library/msgs/es_PE.msg create mode 100755 library/msgs/es_PR.msg create mode 100755 library/msgs/es_PY.msg create mode 100755 library/msgs/es_SV.msg create mode 100755 library/msgs/es_UY.msg create mode 100755 library/msgs/es_VE.msg create mode 100755 library/msgs/et.msg create mode 100755 library/msgs/eu.msg create mode 100755 library/msgs/eu_ES.msg create mode 100755 library/msgs/fa.msg create mode 100755 library/msgs/fa_IN.msg create mode 100755 library/msgs/fa_IR.msg create mode 100755 library/msgs/fi.msg create mode 100755 library/msgs/fo.msg create mode 100755 library/msgs/fo_FO.msg create mode 100755 library/msgs/fr.msg create mode 100755 library/msgs/fr_BE.msg create mode 100755 library/msgs/fr_CA.msg create mode 100755 library/msgs/fr_CH.msg create mode 100755 library/msgs/ga.msg create mode 100755 library/msgs/ga_IE.msg create mode 100755 library/msgs/gl.msg create mode 100755 library/msgs/gl_ES.msg create mode 100755 library/msgs/gv.msg create mode 100755 library/msgs/gv_GB.msg create mode 100755 library/msgs/he.msg create mode 100755 library/msgs/hi.msg create mode 100755 library/msgs/hi_IN.msg create mode 100755 library/msgs/hr.msg create mode 100755 library/msgs/hu.msg create mode 100755 library/msgs/id.msg create mode 100755 library/msgs/id_ID.msg create mode 100755 library/msgs/is.msg create mode 100755 library/msgs/it.msg create mode 100755 library/msgs/it_CH.msg create mode 100755 library/msgs/ja.msg create mode 100755 library/msgs/kl.msg create mode 100755 library/msgs/kl_GL.msg create mode 100755 library/msgs/ko.msg create mode 100755 library/msgs/ko_KR.msg create mode 100755 library/msgs/kok.msg create mode 100755 library/msgs/kok_IN.msg create mode 100755 library/msgs/kw.msg create mode 100755 library/msgs/kw_GB.msg create mode 100755 library/msgs/lt.msg create mode 100755 library/msgs/lv.msg create mode 100755 library/msgs/mk.msg create mode 100755 library/msgs/mr.msg create mode 100755 library/msgs/mr_IN.msg create mode 100755 library/msgs/ms.msg create mode 100755 library/msgs/ms_MY.msg create mode 100755 library/msgs/mt.msg create mode 100755 library/msgs/nb.msg create mode 100755 library/msgs/nl.msg create mode 100755 library/msgs/nl_BE.msg create mode 100755 library/msgs/nn.msg create mode 100755 library/msgs/pl.msg create mode 100755 library/msgs/pt.msg create mode 100755 library/msgs/pt_BR.msg create mode 100755 library/msgs/ro.msg create mode 100755 library/msgs/ru.msg create mode 100755 library/msgs/ru_UA.msg create mode 100755 library/msgs/sh.msg create mode 100755 library/msgs/sk.msg create mode 100755 library/msgs/sl.msg create mode 100755 library/msgs/sq.msg create mode 100755 library/msgs/sr.msg create mode 100755 library/msgs/sv.msg create mode 100755 library/msgs/sw.msg create mode 100755 library/msgs/ta.msg create mode 100755 library/msgs/ta_IN.msg create mode 100755 library/msgs/te.msg create mode 100755 library/msgs/te_IN.msg create mode 100755 library/msgs/th.msg create mode 100755 library/msgs/tr.msg create mode 100755 library/msgs/uk.msg create mode 100755 library/msgs/vi.msg create mode 100755 library/msgs/zh.msg create mode 100755 library/msgs/zh_CN.msg create mode 100755 library/msgs/zh_HK.msg create mode 100755 library/msgs/zh_SG.msg create mode 100755 library/msgs/zh_TW.msg create mode 100644 library/tzdata/Africa/Abidjan create mode 100644 library/tzdata/Africa/Accra create mode 100644 library/tzdata/Africa/Addis_Ababa create mode 100644 library/tzdata/Africa/Algiers create mode 100644 library/tzdata/Africa/Asmera create mode 100644 library/tzdata/Africa/Bamako create mode 100644 library/tzdata/Africa/Bangui create mode 100644 library/tzdata/Africa/Banjul create mode 100644 library/tzdata/Africa/Bissau create mode 100644 library/tzdata/Africa/Blantyre create mode 100644 library/tzdata/Africa/Brazzaville create mode 100644 library/tzdata/Africa/Bujumbura create mode 100644 library/tzdata/Africa/Cairo create mode 100644 library/tzdata/Africa/Casablanca create mode 100644 library/tzdata/Africa/Ceuta create mode 100644 library/tzdata/Africa/Conakry create mode 100644 library/tzdata/Africa/Dakar create mode 100644 library/tzdata/Africa/Dar_es_Salaam create mode 100644 library/tzdata/Africa/Djibouti create mode 100644 library/tzdata/Africa/Douala create mode 100644 library/tzdata/Africa/El_Aaiun create mode 100644 library/tzdata/Africa/Freetown create mode 100644 library/tzdata/Africa/Gaborone create mode 100644 library/tzdata/Africa/Harare create mode 100644 library/tzdata/Africa/Johannesburg create mode 100644 library/tzdata/Africa/Kampala create mode 100644 library/tzdata/Africa/Khartoum create mode 100644 library/tzdata/Africa/Kigali create mode 100644 library/tzdata/Africa/Kinshasa create mode 100644 library/tzdata/Africa/Lagos create mode 100644 library/tzdata/Africa/Libreville create mode 100644 library/tzdata/Africa/Lome create mode 100644 library/tzdata/Africa/Luanda create mode 100644 library/tzdata/Africa/Lubumbashi create mode 100644 library/tzdata/Africa/Lusaka create mode 100644 library/tzdata/Africa/Malabo create mode 100644 library/tzdata/Africa/Maputo create mode 100644 library/tzdata/Africa/Maseru create mode 100644 library/tzdata/Africa/Mbabane create mode 100644 library/tzdata/Africa/Mogadishu create mode 100644 library/tzdata/Africa/Monrovia create mode 100644 library/tzdata/Africa/Nairobi create mode 100644 library/tzdata/Africa/Ndjamena create mode 100644 library/tzdata/Africa/Niamey create mode 100644 library/tzdata/Africa/Nouakchott create mode 100644 library/tzdata/Africa/Ouagadougou create mode 100644 library/tzdata/Africa/Porto-Novo create mode 100644 library/tzdata/Africa/Sao_Tome create mode 100644 library/tzdata/Africa/Timbuktu create mode 100644 library/tzdata/Africa/Tripoli create mode 100644 library/tzdata/Africa/Tunis create mode 100644 library/tzdata/Africa/Windhoek create mode 100644 library/tzdata/America/Adak create mode 100644 library/tzdata/America/Anchorage create mode 100644 library/tzdata/America/Anguilla create mode 100644 library/tzdata/America/Antigua create mode 100644 library/tzdata/America/Araguaina create mode 100644 library/tzdata/America/Argentina/Buenos_Aires create mode 100644 library/tzdata/America/Argentina/Catamarca create mode 100644 library/tzdata/America/Argentina/ComodRivadavia create mode 100644 library/tzdata/America/Argentina/Cordoba create mode 100644 library/tzdata/America/Argentina/Jujuy create mode 100644 library/tzdata/America/Argentina/La_Rioja create mode 100644 library/tzdata/America/Argentina/Mendoza create mode 100644 library/tzdata/America/Argentina/Rio_Gallegos create mode 100644 library/tzdata/America/Argentina/San_Juan create mode 100644 library/tzdata/America/Argentina/Tucuman create mode 100644 library/tzdata/America/Argentina/Ushuaia create mode 100644 library/tzdata/America/Aruba create mode 100644 library/tzdata/America/Asuncion create mode 100644 library/tzdata/America/Atka create mode 100644 library/tzdata/America/Bahia create mode 100644 library/tzdata/America/Barbados create mode 100644 library/tzdata/America/Belem create mode 100644 library/tzdata/America/Belize create mode 100644 library/tzdata/America/Boa_Vista create mode 100644 library/tzdata/America/Bogota create mode 100644 library/tzdata/America/Boise create mode 100644 library/tzdata/America/Buenos_Aires create mode 100644 library/tzdata/America/Cambridge_Bay create mode 100644 library/tzdata/America/Campo_Grande create mode 100644 library/tzdata/America/Cancun create mode 100644 library/tzdata/America/Caracas create mode 100644 library/tzdata/America/Catamarca create mode 100644 library/tzdata/America/Cayenne create mode 100644 library/tzdata/America/Cayman create mode 100644 library/tzdata/America/Chicago create mode 100644 library/tzdata/America/Chihuahua create mode 100644 library/tzdata/America/Cordoba create mode 100644 library/tzdata/America/Costa_Rica create mode 100644 library/tzdata/America/Cuiaba create mode 100644 library/tzdata/America/Curacao create mode 100644 library/tzdata/America/Danmarkshavn create mode 100644 library/tzdata/America/Dawson create mode 100644 library/tzdata/America/Dawson_Creek create mode 100644 library/tzdata/America/Denver create mode 100644 library/tzdata/America/Detroit create mode 100644 library/tzdata/America/Dominica create mode 100644 library/tzdata/America/Edmonton create mode 100644 library/tzdata/America/Eirunepe create mode 100644 library/tzdata/America/El_Salvador create mode 100644 library/tzdata/America/Ensenada create mode 100644 library/tzdata/America/Fort_Wayne create mode 100644 library/tzdata/America/Fortaleza create mode 100644 library/tzdata/America/Glace_Bay create mode 100644 library/tzdata/America/Godthab create mode 100644 library/tzdata/America/Goose_Bay create mode 100644 library/tzdata/America/Grand_Turk create mode 100644 library/tzdata/America/Grenada create mode 100644 library/tzdata/America/Guadeloupe create mode 100644 library/tzdata/America/Guatemala create mode 100644 library/tzdata/America/Guayaquil create mode 100644 library/tzdata/America/Guyana create mode 100644 library/tzdata/America/Halifax create mode 100644 library/tzdata/America/Havana create mode 100644 library/tzdata/America/Hermosillo create mode 100644 library/tzdata/America/Indiana/Indianapolis create mode 100644 library/tzdata/America/Indiana/Knox create mode 100644 library/tzdata/America/Indiana/Marengo create mode 100644 library/tzdata/America/Indiana/Vevay create mode 100644 library/tzdata/America/Indianapolis create mode 100644 library/tzdata/America/Inuvik create mode 100644 library/tzdata/America/Iqaluit create mode 100644 library/tzdata/America/Jamaica create mode 100644 library/tzdata/America/Jujuy create mode 100644 library/tzdata/America/Juneau create mode 100644 library/tzdata/America/Kentucky/Louisville create mode 100644 library/tzdata/America/Kentucky/Monticello create mode 100644 library/tzdata/America/Knox_IN create mode 100644 library/tzdata/America/La_Paz create mode 100644 library/tzdata/America/Lima create mode 100644 library/tzdata/America/Los_Angeles create mode 100644 library/tzdata/America/Louisville create mode 100644 library/tzdata/America/Maceio create mode 100644 library/tzdata/America/Managua create mode 100644 library/tzdata/America/Manaus create mode 100644 library/tzdata/America/Martinique create mode 100644 library/tzdata/America/Mazatlan create mode 100644 library/tzdata/America/Mendoza create mode 100644 library/tzdata/America/Menominee create mode 100644 library/tzdata/America/Merida create mode 100644 library/tzdata/America/Mexico_City create mode 100644 library/tzdata/America/Miquelon create mode 100644 library/tzdata/America/Monterrey create mode 100644 library/tzdata/America/Montevideo create mode 100644 library/tzdata/America/Montreal create mode 100644 library/tzdata/America/Montserrat create mode 100644 library/tzdata/America/Nassau create mode 100644 library/tzdata/America/New_York create mode 100644 library/tzdata/America/Nipigon create mode 100644 library/tzdata/America/Nome create mode 100644 library/tzdata/America/Noronha create mode 100644 library/tzdata/America/North_Dakota/Center create mode 100644 library/tzdata/America/Panama create mode 100644 library/tzdata/America/Pangnirtung create mode 100644 library/tzdata/America/Paramaribo create mode 100644 library/tzdata/America/Phoenix create mode 100644 library/tzdata/America/Port-au-Prince create mode 100644 library/tzdata/America/Port_of_Spain create mode 100644 library/tzdata/America/Porto_Acre create mode 100644 library/tzdata/America/Porto_Velho create mode 100644 library/tzdata/America/Puerto_Rico create mode 100644 library/tzdata/America/Rainy_River create mode 100644 library/tzdata/America/Rankin_Inlet create mode 100644 library/tzdata/America/Recife create mode 100644 library/tzdata/America/Regina create mode 100644 library/tzdata/America/Rio_Branco create mode 100644 library/tzdata/America/Rosario create mode 100644 library/tzdata/America/Santiago create mode 100644 library/tzdata/America/Santo_Domingo create mode 100644 library/tzdata/America/Sao_Paulo create mode 100644 library/tzdata/America/Scoresbysund create mode 100644 library/tzdata/America/Shiprock create mode 100644 library/tzdata/America/St_Johns create mode 100644 library/tzdata/America/St_Kitts create mode 100644 library/tzdata/America/St_Lucia create mode 100644 library/tzdata/America/St_Thomas create mode 100644 library/tzdata/America/St_Vincent create mode 100644 library/tzdata/America/Swift_Current create mode 100644 library/tzdata/America/Tegucigalpa create mode 100644 library/tzdata/America/Thule create mode 100644 library/tzdata/America/Thunder_Bay create mode 100644 library/tzdata/America/Tijuana create mode 100644 library/tzdata/America/Toronto create mode 100644 library/tzdata/America/Tortola create mode 100644 library/tzdata/America/Vancouver create mode 100644 library/tzdata/America/Virgin create mode 100644 library/tzdata/America/Whitehorse create mode 100644 library/tzdata/America/Winnipeg create mode 100644 library/tzdata/America/Yakutat create mode 100644 library/tzdata/America/Yellowknife create mode 100644 library/tzdata/Antarctica/Casey create mode 100644 library/tzdata/Antarctica/Davis create mode 100644 library/tzdata/Antarctica/DumontDUrville create mode 100644 library/tzdata/Antarctica/Mawson create mode 100644 library/tzdata/Antarctica/McMurdo create mode 100644 library/tzdata/Antarctica/Palmer create mode 100644 library/tzdata/Antarctica/Rothera create mode 100644 library/tzdata/Antarctica/South_Pole create mode 100644 library/tzdata/Antarctica/Syowa create mode 100644 library/tzdata/Antarctica/Vostok create mode 100644 library/tzdata/Arctic/Longyearbyen create mode 100644 library/tzdata/Asia/Aden create mode 100644 library/tzdata/Asia/Almaty create mode 100644 library/tzdata/Asia/Amman create mode 100644 library/tzdata/Asia/Anadyr create mode 100644 library/tzdata/Asia/Aqtau create mode 100644 library/tzdata/Asia/Aqtobe create mode 100644 library/tzdata/Asia/Ashgabat create mode 100644 library/tzdata/Asia/Ashkhabad create mode 100644 library/tzdata/Asia/Baghdad create mode 100644 library/tzdata/Asia/Bahrain create mode 100644 library/tzdata/Asia/Baku create mode 100644 library/tzdata/Asia/Bangkok create mode 100644 library/tzdata/Asia/Beirut create mode 100644 library/tzdata/Asia/Bishkek create mode 100644 library/tzdata/Asia/Brunei create mode 100644 library/tzdata/Asia/Calcutta create mode 100644 library/tzdata/Asia/Choibalsan create mode 100644 library/tzdata/Asia/Chongqing create mode 100644 library/tzdata/Asia/Chungking create mode 100644 library/tzdata/Asia/Colombo create mode 100644 library/tzdata/Asia/Dacca create mode 100644 library/tzdata/Asia/Damascus create mode 100644 library/tzdata/Asia/Dhaka create mode 100644 library/tzdata/Asia/Dili create mode 100644 library/tzdata/Asia/Dubai create mode 100644 library/tzdata/Asia/Dushanbe create mode 100644 library/tzdata/Asia/Gaza create mode 100644 library/tzdata/Asia/Harbin create mode 100644 library/tzdata/Asia/Hong_Kong create mode 100644 library/tzdata/Asia/Hovd create mode 100644 library/tzdata/Asia/Irkutsk create mode 100644 library/tzdata/Asia/Istanbul create mode 100644 library/tzdata/Asia/Jakarta create mode 100644 library/tzdata/Asia/Jayapura create mode 100644 library/tzdata/Asia/Jerusalem create mode 100644 library/tzdata/Asia/Kabul create mode 100644 library/tzdata/Asia/Kamchatka create mode 100644 library/tzdata/Asia/Karachi create mode 100644 library/tzdata/Asia/Kashgar create mode 100644 library/tzdata/Asia/Katmandu create mode 100644 library/tzdata/Asia/Krasnoyarsk create mode 100644 library/tzdata/Asia/Kuala_Lumpur create mode 100644 library/tzdata/Asia/Kuching create mode 100644 library/tzdata/Asia/Kuwait create mode 100644 library/tzdata/Asia/Macao create mode 100644 library/tzdata/Asia/Macau create mode 100644 library/tzdata/Asia/Magadan create mode 100644 library/tzdata/Asia/Makassar create mode 100644 library/tzdata/Asia/Manila create mode 100644 library/tzdata/Asia/Muscat create mode 100644 library/tzdata/Asia/Nicosia create mode 100644 library/tzdata/Asia/Novosibirsk create mode 100644 library/tzdata/Asia/Omsk create mode 100644 library/tzdata/Asia/Oral create mode 100644 library/tzdata/Asia/Phnom_Penh create mode 100644 library/tzdata/Asia/Pontianak create mode 100644 library/tzdata/Asia/Pyongyang create mode 100644 library/tzdata/Asia/Qatar create mode 100644 library/tzdata/Asia/Qyzylorda create mode 100644 library/tzdata/Asia/Rangoon create mode 100644 library/tzdata/Asia/Riyadh create mode 100644 library/tzdata/Asia/Saigon create mode 100644 library/tzdata/Asia/Sakhalin create mode 100644 library/tzdata/Asia/Samarkand create mode 100644 library/tzdata/Asia/Seoul create mode 100644 library/tzdata/Asia/Shanghai create mode 100644 library/tzdata/Asia/Singapore create mode 100644 library/tzdata/Asia/Taipei create mode 100644 library/tzdata/Asia/Tashkent create mode 100644 library/tzdata/Asia/Tbilisi create mode 100644 library/tzdata/Asia/Tehran create mode 100644 library/tzdata/Asia/Tel_Aviv create mode 100644 library/tzdata/Asia/Thimbu create mode 100644 library/tzdata/Asia/Thimphu create mode 100644 library/tzdata/Asia/Tokyo create mode 100644 library/tzdata/Asia/Ujung_Pandang create mode 100644 library/tzdata/Asia/Ulaanbaatar create mode 100644 library/tzdata/Asia/Ulan_Bator create mode 100644 library/tzdata/Asia/Urumqi create mode 100644 library/tzdata/Asia/Vientiane create mode 100644 library/tzdata/Asia/Vladivostok create mode 100644 library/tzdata/Asia/Yakutsk create mode 100644 library/tzdata/Asia/Yekaterinburg create mode 100644 library/tzdata/Asia/Yerevan create mode 100644 library/tzdata/Atlantic/Azores create mode 100644 library/tzdata/Atlantic/Bermuda create mode 100644 library/tzdata/Atlantic/Canary create mode 100644 library/tzdata/Atlantic/Cape_Verde create mode 100644 library/tzdata/Atlantic/Faeroe create mode 100644 library/tzdata/Atlantic/Jan_Mayen create mode 100644 library/tzdata/Atlantic/Madeira create mode 100644 library/tzdata/Atlantic/Reykjavik create mode 100644 library/tzdata/Atlantic/South_Georgia create mode 100644 library/tzdata/Atlantic/St_Helena create mode 100644 library/tzdata/Atlantic/Stanley create mode 100644 library/tzdata/Australia/ACT create mode 100644 library/tzdata/Australia/Adelaide create mode 100644 library/tzdata/Australia/Brisbane create mode 100644 library/tzdata/Australia/Broken_Hill create mode 100644 library/tzdata/Australia/Canberra create mode 100644 library/tzdata/Australia/Darwin create mode 100644 library/tzdata/Australia/Hobart create mode 100644 library/tzdata/Australia/LHI create mode 100644 library/tzdata/Australia/Lindeman create mode 100644 library/tzdata/Australia/Lord_Howe create mode 100644 library/tzdata/Australia/Melbourne create mode 100644 library/tzdata/Australia/NSW create mode 100644 library/tzdata/Australia/North create mode 100644 library/tzdata/Australia/Perth create mode 100644 library/tzdata/Australia/Queensland create mode 100644 library/tzdata/Australia/South create mode 100644 library/tzdata/Australia/Sydney create mode 100644 library/tzdata/Australia/Tasmania create mode 100644 library/tzdata/Australia/Victoria create mode 100644 library/tzdata/Australia/West create mode 100644 library/tzdata/Australia/Yancowinna create mode 100644 library/tzdata/Brazil/Acre create mode 100644 library/tzdata/Brazil/DeNoronha create mode 100644 library/tzdata/Brazil/East create mode 100644 library/tzdata/Brazil/West create mode 100644 library/tzdata/CET create mode 100644 library/tzdata/CST6CDT create mode 100644 library/tzdata/Canada/Atlantic create mode 100644 library/tzdata/Canada/Central create mode 100644 library/tzdata/Canada/East-Saskatchewan create mode 100644 library/tzdata/Canada/Eastern create mode 100644 library/tzdata/Canada/Mountain create mode 100644 library/tzdata/Canada/Newfoundland create mode 100644 library/tzdata/Canada/Pacific create mode 100644 library/tzdata/Canada/Saskatchewan create mode 100644 library/tzdata/Canada/Yukon create mode 100644 library/tzdata/Chile/Continental create mode 100644 library/tzdata/Chile/EasterIsland create mode 100644 library/tzdata/Cuba create mode 100644 library/tzdata/EET create mode 100644 library/tzdata/EST create mode 100644 library/tzdata/EST5EDT create mode 100644 library/tzdata/Egypt create mode 100644 library/tzdata/Eire create mode 100644 library/tzdata/Etc/GMT create mode 100644 library/tzdata/Etc/GMT+0 create mode 100644 library/tzdata/Etc/GMT+1 create mode 100644 library/tzdata/Etc/GMT+10 create mode 100644 library/tzdata/Etc/GMT+11 create mode 100644 library/tzdata/Etc/GMT+12 create mode 100644 library/tzdata/Etc/GMT+2 create mode 100644 library/tzdata/Etc/GMT+3 create mode 100644 library/tzdata/Etc/GMT+4 create mode 100644 library/tzdata/Etc/GMT+5 create mode 100644 library/tzdata/Etc/GMT+6 create mode 100644 library/tzdata/Etc/GMT+7 create mode 100644 library/tzdata/Etc/GMT+8 create mode 100644 library/tzdata/Etc/GMT+9 create mode 100644 library/tzdata/Etc/GMT-0 create mode 100644 library/tzdata/Etc/GMT-1 create mode 100644 library/tzdata/Etc/GMT-10 create mode 100644 library/tzdata/Etc/GMT-11 create mode 100644 library/tzdata/Etc/GMT-12 create mode 100644 library/tzdata/Etc/GMT-13 create mode 100644 library/tzdata/Etc/GMT-14 create mode 100644 library/tzdata/Etc/GMT-2 create mode 100644 library/tzdata/Etc/GMT-3 create mode 100644 library/tzdata/Etc/GMT-4 create mode 100644 library/tzdata/Etc/GMT-5 create mode 100644 library/tzdata/Etc/GMT-6 create mode 100644 library/tzdata/Etc/GMT-7 create mode 100644 library/tzdata/Etc/GMT-8 create mode 100644 library/tzdata/Etc/GMT-9 create mode 100644 library/tzdata/Etc/GMT0 create mode 100644 library/tzdata/Etc/Greenwich create mode 100644 library/tzdata/Etc/UCT create mode 100644 library/tzdata/Etc/UTC create mode 100644 library/tzdata/Etc/Universal create mode 100644 library/tzdata/Etc/Zulu create mode 100644 library/tzdata/Europe/Amsterdam create mode 100644 library/tzdata/Europe/Andorra create mode 100644 library/tzdata/Europe/Athens create mode 100644 library/tzdata/Europe/Belfast create mode 100644 library/tzdata/Europe/Belgrade create mode 100644 library/tzdata/Europe/Berlin create mode 100644 library/tzdata/Europe/Bratislava create mode 100644 library/tzdata/Europe/Brussels create mode 100644 library/tzdata/Europe/Bucharest create mode 100644 library/tzdata/Europe/Budapest create mode 100644 library/tzdata/Europe/Chisinau create mode 100644 library/tzdata/Europe/Copenhagen create mode 100644 library/tzdata/Europe/Dublin create mode 100644 library/tzdata/Europe/Gibraltar create mode 100644 library/tzdata/Europe/Helsinki create mode 100644 library/tzdata/Europe/Istanbul create mode 100644 library/tzdata/Europe/Kaliningrad create mode 100644 library/tzdata/Europe/Kiev create mode 100644 library/tzdata/Europe/Lisbon create mode 100644 library/tzdata/Europe/Ljubljana create mode 100644 library/tzdata/Europe/London create mode 100644 library/tzdata/Europe/Luxembourg create mode 100644 library/tzdata/Europe/Madrid create mode 100644 library/tzdata/Europe/Malta create mode 100644 library/tzdata/Europe/Mariehamn create mode 100644 library/tzdata/Europe/Minsk create mode 100644 library/tzdata/Europe/Monaco create mode 100644 library/tzdata/Europe/Moscow create mode 100644 library/tzdata/Europe/Nicosia create mode 100644 library/tzdata/Europe/Oslo create mode 100644 library/tzdata/Europe/Paris create mode 100644 library/tzdata/Europe/Prague create mode 100644 library/tzdata/Europe/Riga create mode 100644 library/tzdata/Europe/Rome create mode 100644 library/tzdata/Europe/Samara create mode 100644 library/tzdata/Europe/San_Marino create mode 100644 library/tzdata/Europe/Sarajevo create mode 100644 library/tzdata/Europe/Simferopol create mode 100644 library/tzdata/Europe/Skopje create mode 100644 library/tzdata/Europe/Sofia create mode 100644 library/tzdata/Europe/Stockholm create mode 100644 library/tzdata/Europe/Tallinn create mode 100644 library/tzdata/Europe/Tirane create mode 100644 library/tzdata/Europe/Tiraspol create mode 100644 library/tzdata/Europe/Uzhgorod create mode 100644 library/tzdata/Europe/Vaduz create mode 100644 library/tzdata/Europe/Vatican create mode 100644 library/tzdata/Europe/Vienna create mode 100644 library/tzdata/Europe/Vilnius create mode 100644 library/tzdata/Europe/Warsaw create mode 100644 library/tzdata/Europe/Zagreb create mode 100644 library/tzdata/Europe/Zaporozhye create mode 100644 library/tzdata/Europe/Zurich create mode 100644 library/tzdata/GB create mode 100644 library/tzdata/GB-Eire create mode 100644 library/tzdata/GMT create mode 100644 library/tzdata/GMT+0 create mode 100644 library/tzdata/GMT-0 create mode 100644 library/tzdata/GMT0 create mode 100644 library/tzdata/Greenwich create mode 100644 library/tzdata/HST create mode 100644 library/tzdata/Hongkong create mode 100644 library/tzdata/Iceland create mode 100644 library/tzdata/Indian/Antananarivo create mode 100644 library/tzdata/Indian/Chagos create mode 100644 library/tzdata/Indian/Christmas create mode 100644 library/tzdata/Indian/Cocos create mode 100644 library/tzdata/Indian/Comoro create mode 100644 library/tzdata/Indian/Kerguelen create mode 100644 library/tzdata/Indian/Mahe create mode 100644 library/tzdata/Indian/Maldives create mode 100644 library/tzdata/Indian/Mauritius create mode 100644 library/tzdata/Indian/Mayotte create mode 100644 library/tzdata/Indian/Reunion create mode 100644 library/tzdata/Iran create mode 100644 library/tzdata/Israel create mode 100644 library/tzdata/Jamaica create mode 100644 library/tzdata/Japan create mode 100644 library/tzdata/Kwajalein create mode 100644 library/tzdata/Libya create mode 100644 library/tzdata/MET create mode 100644 library/tzdata/MST create mode 100644 library/tzdata/MST7MDT create mode 100644 library/tzdata/Mexico/BajaNorte create mode 100644 library/tzdata/Mexico/BajaSur create mode 100644 library/tzdata/Mexico/General create mode 100644 library/tzdata/NZ create mode 100644 library/tzdata/NZ-CHAT create mode 100644 library/tzdata/Navajo create mode 100644 library/tzdata/PRC create mode 100644 library/tzdata/PST8PDT create mode 100644 library/tzdata/Pacific/Apia create mode 100644 library/tzdata/Pacific/Auckland create mode 100644 library/tzdata/Pacific/Chatham create mode 100644 library/tzdata/Pacific/Easter create mode 100644 library/tzdata/Pacific/Efate create mode 100644 library/tzdata/Pacific/Enderbury create mode 100644 library/tzdata/Pacific/Fakaofo create mode 100644 library/tzdata/Pacific/Fiji create mode 100644 library/tzdata/Pacific/Funafuti create mode 100644 library/tzdata/Pacific/Galapagos create mode 100644 library/tzdata/Pacific/Gambier create mode 100644 library/tzdata/Pacific/Guadalcanal create mode 100644 library/tzdata/Pacific/Guam create mode 100644 library/tzdata/Pacific/Honolulu create mode 100644 library/tzdata/Pacific/Johnston create mode 100644 library/tzdata/Pacific/Kiritimati create mode 100644 library/tzdata/Pacific/Kosrae create mode 100644 library/tzdata/Pacific/Kwajalein create mode 100644 library/tzdata/Pacific/Majuro create mode 100644 library/tzdata/Pacific/Marquesas create mode 100644 library/tzdata/Pacific/Midway create mode 100644 library/tzdata/Pacific/Nauru create mode 100644 library/tzdata/Pacific/Niue create mode 100644 library/tzdata/Pacific/Norfolk create mode 100644 library/tzdata/Pacific/Noumea create mode 100644 library/tzdata/Pacific/Pago_Pago create mode 100644 library/tzdata/Pacific/Palau create mode 100644 library/tzdata/Pacific/Pitcairn create mode 100644 library/tzdata/Pacific/Ponape create mode 100644 library/tzdata/Pacific/Port_Moresby create mode 100644 library/tzdata/Pacific/Rarotonga create mode 100644 library/tzdata/Pacific/Saipan create mode 100644 library/tzdata/Pacific/Samoa create mode 100644 library/tzdata/Pacific/Tahiti create mode 100644 library/tzdata/Pacific/Tarawa create mode 100644 library/tzdata/Pacific/Tongatapu create mode 100644 library/tzdata/Pacific/Truk create mode 100644 library/tzdata/Pacific/Wake create mode 100644 library/tzdata/Pacific/Wallis create mode 100644 library/tzdata/Pacific/Yap create mode 100644 library/tzdata/Poland create mode 100644 library/tzdata/Portugal create mode 100644 library/tzdata/ROC create mode 100644 library/tzdata/ROK create mode 100644 library/tzdata/Singapore create mode 100644 library/tzdata/SystemV/AST4 create mode 100644 library/tzdata/SystemV/AST4ADT create mode 100644 library/tzdata/SystemV/CST6 create mode 100644 library/tzdata/SystemV/CST6CDT create mode 100644 library/tzdata/SystemV/EST5 create mode 100644 library/tzdata/SystemV/EST5EDT create mode 100644 library/tzdata/SystemV/HST10 create mode 100644 library/tzdata/SystemV/MST7 create mode 100644 library/tzdata/SystemV/MST7MDT create mode 100644 library/tzdata/SystemV/PST8 create mode 100644 library/tzdata/SystemV/PST8PDT create mode 100644 library/tzdata/SystemV/YST9 create mode 100644 library/tzdata/SystemV/YST9YDT create mode 100644 library/tzdata/Turkey create mode 100644 library/tzdata/UCT create mode 100644 library/tzdata/US/Alaska create mode 100644 library/tzdata/US/Aleutian create mode 100644 library/tzdata/US/Arizona create mode 100644 library/tzdata/US/Central create mode 100644 library/tzdata/US/East-Indiana create mode 100644 library/tzdata/US/Eastern create mode 100644 library/tzdata/US/Hawaii create mode 100644 library/tzdata/US/Indiana-Starke create mode 100644 library/tzdata/US/Michigan create mode 100644 library/tzdata/US/Mountain create mode 100644 library/tzdata/US/Pacific create mode 100644 library/tzdata/US/Pacific-New create mode 100644 library/tzdata/US/Samoa create mode 100644 library/tzdata/UTC create mode 100644 library/tzdata/Universal create mode 100644 library/tzdata/W-SU create mode 100644 library/tzdata/WET create mode 100644 library/tzdata/Zulu create mode 100644 tools/installData.tcl create mode 100755 tools/loadICU.tcl create mode 100755 tools/makeTestCases.tcl create mode 100755 tools/tclZIC.tcl diff --git a/ChangeLog b/ChangeLog index 49d782f..cf75571 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,47 @@ +2004-08-18 Kevin Kenny + + * doc/clock.n + * generic/tclBasic.c (Tcl_CreateInterp, Tcl_HideUnsafeCommands): + * generic/tclClock.c (all): + * generic/tclInt.h: + * generic/tclInterp.c (CreateSlave): + * library/clock.tcl: (new file) + * library/init.tcl (clock): + * library/msgs/*.msg:(new files) + * library/tzdata/*: + * library/tzdata/*/*: + * library/tzdata/*/*/*: (new files) + * tools/installData.tcl: (new file) + * tools/loadICU.tcl: (new file) + * tools/makeTestCases.tcl: (new file) + * tools/tclZIC.tcl: (new file) + * unix/Makefile.in: + * unix/configure: (regenerated) + * unix/tcl.m4: + Implementation of TIPs #173 and #209. + + The [clock] command is now a Tcl ensemble, with most of its + functionality written in Tcl and callouts to C code only to + access low-level functions such as localtime, mktime and + tzset. + + In addition to the functionality changes called out in the two + TIPs, it is worth noting that the [clock] command in a safe + slave interpreter is now an alias to the [clock] command in the + master, and that [clock] is otherwise not expected to function + entirely correctly in safe interps. C code that simply does + Tcl_MakeSafe needs to be aware that [clock] may need special + handling. (It appears unlikely that such code actually exists.) + + Many thanks to all the many people who assisted with testing, + debugging, criticism of the specification, and localisation. + Deserving of particular mention are Joe English, Clif Flynt, Donal + K. Fellows, Jeff Hobbs, Cameron Laird, Arjen Markus, Reinhard Max, + Christopher Nelson, Steve Offutt, Donald G. Porter, Pascal + Scheffers, Peter da Silva and Richard Suchenwirth-Bauersachs. + + *** POTENTIAL INCOMPATIBILITY *** + 2004-08-16 Miguel Sofer * doc/SetVar.3: diff --git a/doc/clock.n b/doc/clock.n index b23e976..31b919c 100644 --- a/doc/clock.n +++ b/doc/clock.n @@ -1,252 +1,822 @@ '\" -'\" Copyright (c) 1992-1995 Karl Lehenbauer and Mark Diekhans. -'\" Copyright (c) 1995-1997 Sun Microsystems, Inc. -'\" Copyright (c) 1998-1999 Scriptics Corporation -'\" Copyright (c) 2002 ActiveState Corporation +'\" Generated from file './doc/clock.dt' by tcllib/doctools with format 'nroff' +'\" Copyright (c) 2004 Kevin B. Kenny . All rights reserved. '\" -'\" This documentation is derived from the time and date facilities of -'\" TclX, by Mark Diekhans and Karl Lehenbauer. -'\" -'\" See the file "license.terms" for information on usage and redistribution -'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" -'\" RCS: @(#) $Id: clock.n,v 1.17 2004/05/24 23:31:42 dkf Exp $ -'\" .so man.macros -.TH clock n 8.4 Tcl "Tcl Built-In Commands" +.TH "clock" n 8.5 Tcl "Tcl commands" .BS -'\" Note: do not modify the .SH NAME line immediately below! -.SH NAME -clock \- Obtain and manipulate time -.SH SYNOPSIS -\fBclock \fIoption\fR ?\fIarg arg ...\fR? +.SH "NAME" +clock \- Obtain and manipulate dates and times +.SH "SYNOPSIS" +package require \fBTcl 8.5\fR +.sp +\fBclock add\fR \fItimeVal\fR ?\fIcount unit...\fR? ?\fI-option value\fR? +.sp +\fBclock clicks\fR ?\fI-option\fR? +.sp +\fBclock format\fR \fItimeVal\fR ?\fI-option value\fR...? +.sp +\fBclock microseconds\fR +.sp +\fBclock milliseconds\fR +.sp +\fBclock scan\fR \fIinputString\fR ?\fI-option value\fR...? +.sp +\fBclock seconds\fR +.sp .BE - -.SH DESCRIPTION +.SH "DESCRIPTION" .PP -This command performs one of several operations that may obtain -or manipulate strings or values that represent some notion of -time. The \fIoption\fR argument determines what action is carried -out by the command. The legal \fIoptions\fR (which may be -abbreviated) are: +The \fBclock\fR command performs several operations that obtain and +manipulate values that represent times. The command supports several +subcommands that determine what action is carried out by the command. .TP -\fBclock clicks\fR ?\fI\-option\fR? -If no \fIoption\fR argument is supplied, returns a high-resolution +\fBclock add\fR \fItimeVal\fR ?\fIcount unit...\fR? ?\fI-option value\fR? +Adds a (possibly negative) offset to a time that is expressed as an +integer number of seconds. See \fBCLOCK ARITHMETIC\fR for a full description. +.TP +\fBclock clicks\fR ?\fI-option\fR? +If no \fI-option\fR argument is supplied, returns a high-resolution time value as a system-dependent integer value. The unit of the value is system-dependent but should be the highest resolution clock available -on the system such as a CPU cycle counter. -.TP -.VS 8.5 -If the \fIoption\fR argument is \fB\-milliseconds\fR, then the value is -guaranteed to be an approximate count of milliseconds returned as -a wide integer; the rule should -always hold that \fBclock clicks -milliseconds\fR divided by 1000 is the -same as \fBclock seconds\fR. -.TP -It the \fIoption\fR argument is \fB-microseconds\fR, then the value is -guaranteed to be an approximate count of microseconds returned as a wide -integer; the rule should hold that \fBclock clicks -microseconds\fR -divided by 1000 is the same as \fBclock clicks -milliseconds\fR. -.TP -On some hardware, the counts of milliseconds and microseconds may diverge -from the system clock for short periods; the reason is that they can -be derived from different sources, and a complex procedure is required -to calibrate them. Moreover, Tcl makes an effort never to have the clock -leap forward nor appear to run backward, preferring instead to slow or -speed up the clock frequency slightly until it's back in synchronization. -For this reason, most Tcl programmers need never worry about such -phenomena as leap seconds. -.VE 8.5 -.TP -\fBclock format \fIclockValue\fR ?\fB\-format \fIstring\fR? ?\fB\-gmt \fIboolean\fR? -Converts an integer time value, typically returned by -\fBclock seconds\fR, \fBclock scan\fR, or the \fBatime\fR or \fBmtime\fR -options of the \fBfile\fR command, to human-readable -form. If the \fB\-format\fR argument is present the next argument is a -string that describes how the date and time are to be formatted. -Field descriptors consist of a \fB%\fR followed by a field -descriptor character. All other characters are copied into the result. -Valid field descriptors are: -.RS -.IP \fB%%\fR -Insert a %. -.IP \fB%a\fR -Abbreviated weekday name (Mon, Tue, etc.). -.IP \fB%A\fR -Full weekday name (Monday, Tuesday, etc.). -.IP \fB%b\fR -Abbreviated month name (Jan, Feb, etc.). -.IP \fB%B\fR -Full month name. -.IP \fB%c\fR -Locale specific date and time. The format for date and time -in the default "C" locale on Unix is "%a %b %d %H:%M:%S %Y". -On Windows, this value is the locale specific long date and time, as -specified in the Regional Options control panel settings. -.IP \fB%C\fR -First two digits of the four-digit year (19 or 20). -.IP \fB%d\fR -Day of month (01 - 31). -'\" Since the inclusion of compat/strftime.c, %D, %e, %h should work on all -'\" platforms. -.IP \fB%D\fR -Date as %m/%d/%y. -.IP \fB%e\fR -Day of month (1 - 31), no leading zeros. -.IP \fB%g\fR -The ISO8601 year number corresponding to the ISO8601 week (%V), expressed -as a two-digit year-of-the-century, with leading zero if necessary. -.IP \fB%G\fR -The ISO8601 year number corresponding to the ISO8601 week (%V), expressed -as a four-digit number. -.IP \fB%h\fR -Abbreviated month name. -.IP \fB%H\fR -Hour in 24-hour format (00 - 23). -.IP \fB%I\fR -Hour in 12-hour format (01 - 12). -.IP \fB%j\fR -Day of year (001 - 366). -.IP \fB%k\fR -Hour in 24-hour format, without leading zeros (0 - 23). -.IP \fB%l\fR -Hour in 12-hour format, without leading zeros (1 - 12). -.IP \fB%m\fR -Month number (01 - 12). -.IP \fB%M\fR -Minute (00 - 59). -.IP \fB%n\fR -Insert a newline. -.IP \fB%p\fR -AM/PM indicator. -.IP \fB%r\fR -Time in a locale-specific "meridian" format. The "meridian" -format in the default "C" locale is "%I:%M:%S %p". -.IP \fB%R\fR -Time as %H:%M. -.IP \fB%s\fR -Count of seconds since the epoch, expressed as a decimal integer. -.IP \fB%S\fR -Seconds (00 - 59). -.IP \fB%t\fR -Insert a tab. -.IP \fB%T\fR -Time as %H:%M:%S. -.IP \fB%u\fR -Weekday number (Monday = 1, Sunday = 7). -.IP \fB%U\fR -Week of year (00 - 52), Sunday is the first day of the week. -.IP \fB%V\fR -Week of year according to ISO-8601 rules. Week 1 of a given -year is the week containing 4 January. -.IP \fB%w\fR -Weekday number (Sunday = 0, Saturday = 6). -.IP \fB%W\fR -Week of year (00 - 52), Monday is the first day of the week. -.IP \fB%x\fR -Locale specific date format. The format for a date in the default "C" -locale for Unix is "%m/%d/%y". -On Windows, this value is the locale specific short date format, as -specified in the Regional Options control panel settings. -.IP \fB%X\fR -Locale specific 24-hour time format. The format for a -24-hour time in the default "C" locale for Unix is "%H:%M:%S". -On Windows, this value is the locale specific time format, as -specified in the Regional Options control panel settings. -.IP \fB%y\fR -Year without century (00 - 99). -.IP \fB%Y\fR -Year with century (e.g. 1990) -.IP \fB%Z\fR -Time zone name. -.RE +on the system such as a CPU cycle counter. See \fBHIGH RESOLUTION TIMERS\fR for a full description. +.sp +If the \fI-option\fR argument is \fI-milliseconds\fR, then the command +is synonymous with \fBclock milliseconds\fR (see below). This +usage is obsolete, and \fBclock milliseconds\fR is to be +considered the preferred way of obtaining a count of milliseconds. .sp -'\" All the field descriptors should be portable now that -'\" compat/strftime.c is in place, with the possible exception -'\" of the time zone name. -'\".RS -'\"In addition, the following field descriptors may be supported on some -'\"systems (e.g. Unix but not Windows): -'\".IP \fB%D\fR -'\"Date as %m/%d/%y. -'\".IP \fB%e\fR -'\"Day of month (1 - 31), no leading zeros. -'\".IP \fB%h\fR -'\"Abbreviated month name. -'\".IP \fB%n\fR -'\"Insert a newline. -'\".IP \fB%r\fR -'\"Time as %I:%M:%S %p. -'\".IP \fB%R\fR -'\"Time as %H:%M. -'\".IP \fB%t\fR -'\"Insert a tab. -'\".IP \fB%T\fR -'\"Time as %H:%M:%S. -'\".RE -'\".sp +It the \fI-option\fR argument is \fI-microseconds\fR, then the command +is synonymous with \fBclock microseconds\fR (see below). This +usage is obsolete, and \fBclock microseconds\fR is to be +considered the preferred way of obtaining a count of microseconds. +.TP +\fBclock format\fR \fItimeVal\fR ?\fI-option value\fR...? +Formats a time that is expressed as an integer number of seconds into a format +intended for consumption by users or external programs. +See \fBFORMATTING TIMES\fR for a full description. +.TP +\fBclock microseconds\fR +Returns the current time as an integer number of microseconds. See \fBHIGH RESOLUTION TIMERS\fR for a full description. +.TP +\fBclock milliseconds\fR +Returns the current time as an integer number of milliseconds. See \fBHIGH RESOLUTION TIMERS\fR for a full description. +.TP +\fBclock scan\fR \fIinputString\fR ?\fI-option value\fR...? +Scans a time that is expressed as a character string and produces an +integer number of seconds. +See \fBSCANNING TIMES\fR for a full description. +.TP +\fBclock seconds\fR +Returns the current time as an integer number of seconds. +.SH "PARAMETERS" +.TP +\fIcount\fR +An integer representing a count of some unit of time. See +\fBCLOCK ARITHMETIC\fR for the details. +.TP +\fItimeVal\fR +An integer value passed to the \fBclock\fR command that represents an +absolute time as a number of seconds from the \fIepoch time\fR of +1 January 1970, 00:00 UTC. Note that the count of seconds does not +include any leap seconds; seconds are counted as if each UTC day has +exactly 86400 seconds. Tcl responds to leap seconds by speeding or +slowing its clock by a tiny fraction for some minutes until it is +back in sync with UTC; its data model does not represent minutes that +have 59 or 61 seconds. +.TP +\fIunit\fR +One of the words, \fBseconds\fR, \fBminutes\fR, \fBhours\fR, +\fBdays\fR, \fBweeks\fR, \fBmonths\fR, or \fByears\fR, or +any unique prefix of such a word. Used in conjuction with \fIcount\fR +to identify an interval of time, for example, \fI3 seconds\fR or +\fI1 year\fR. +.SH "OPTIONS" +.TP +\fB-base\fR time +Specifies that any relative times present in a \fBclock scan\fR command +are to be given relative to \fItime\fR. \fItime\fR must be expressed as +a count of nominal seconds from the epoch time of 1 January 1970, 00:00 UTC. +.TP +\fB-format\fR format +Specifies the desired output format for \fBclock format\fR or the +expected input format for \fBclock scan\fR. The \fIformat\fR string consists +of any number of characters other than the per-cent sign ('\fI%\fR') +interspersed with any number of \fIformat groups\fR, which are two-character +sequences beginning with the per-cent sign. The permissible format groups, +and their interpretation, are described under \fBFORMAT GROUPS\fR. +.TP +\fB-gmt\fR boolean +If \fIboolean\fR is true, specifies that a time specified to \fBclock add\fR, +\fBclock format\fR or \fBclock scan\fR should be processed in +UTC. If \fIboolean\fR is false, the processing defaults to the local time +zone. This usage is obsolete; the correct current usage is to +specify the UTC time zone with '\fB-timezone\fR \fI:UTC\fR' or any of +the equivalent ways to specify it. +.TP +\fB-locale\fR localeName +Specifies that locale-dependent scanning and formatting (and date arithmetic +for dates preceding the adoption of the Gregorian calendar) is to be done in +the locale identified by \fIlocaleName\fR. The locale name may be any of +the locales acceptable to the \fBmsgcat\fR command, or it may be the special +name \fIsystem\fR, which represents the current locale of the process, or +the null string, which represents Tcl's default locale. +.sp +The effect of locale on scanning and formatting is discussed in the +descriptions of the individual format groups under \fBFORMAT GROUPS\fR. +The effect of locale on clock arithmetic is discussed under +\fBCLOCK ARITHMETIC\fR. +.TP +\fB-timezone\fR zoneName +Specifies that clock arithmetic, formatting, and scanning are to be done +according to the rules for the time zone specified by \fIzoneName\fR. +The permissible values, and their interpretation, are discussed under +\fBTIME ZONES\fR. +On subcommands that expect a \fB-timezone\fR argument, the default +is to use the \fIcurrent time zone\fR. The current time zone is +determined, in order of preference, by: .RS -If the \fB\-format\fR argument is not specified, the format string -\fB"%a %b %d %H:%M:%S %Z %Y"\fR is used. If the \fB\-gmt\fR argument -is present the next argument must be a boolean which if true specifies -that the time will be formatted as Greenwich Mean Time. If false -then the local timezone will be used as defined by the operating -environment. +.IP [1] +the environment variable \fBTCL_TZ\fR. +.IP [2] +the environment variable \fBTZ\fR. +.IP [3] +on Windows systems, the time zone settings from the Control Panel. .RE +If none of these is present, the C \fBlocaltime\fR and \fBmktime\fR +functions are used to attempt to convert times between local and +Greenwich. On 32-bit systems, this approach is likely to have bugs, +particularly for times that lie outside the window (approximately the +years 1902 to 2037) that can be represented in a 32-bit integer. +.SH "CLOCK ARITHMETIC" +The \fBclock add\fR command performs clock arithmetic on a value +(expressed as nominal seconds from the epoch time of 1 January 1970, 00:00 UTC) +given as its first argument. The remaining arguments (other than the +possible \fB-timezone\fR, \fB-locale\fR and \fB-gmt\fR options) +are integers and keywords in alternation, where the keywords are chosen +from \fBseconds\fR, \fBminutes\fR, \fBhours\fR, +\fBdays\fR, \fBweeks\fR, \fBmonths\fR, or \fByears\fR, or +any unique prefix of such a word. +.PP +Addition of seconds, minutes and hours is fairly straightforward; +the given time increment (times sixty for minutes, or 3600 for hours) +is simply added to the \fItimeVal\fR given +to the \fBclock add\fR command. The result is interpreted as +a nominal number of seconds from the Epoch. +.PP +Surprising results +may be obtained when crossing a point at which a leap second is +inserted or removed; the \fBclock add\fR command simply ignores +leap seconds and therefore assumes that times come in sequence, +23:59:58, 23:59:59, 00:00:00. (This assumption is handled by +the fact that Tcl's model of time reacts to leap seconds by speeding +or slowing the clock by a minuscule amount until Tcl's time +is back in step with the world. +.PP +The fact that adding and subtracting hours is defined in terms of +absolute time means that it will add fixed amounts of time in time zones +that observe summer time (Daylight Saving Time). For example, +the following code sets the value of \fBx\fR to \fB04:00:00\fR because +the clock has changed in the interval in question. +.CS +set s [clock scan {2004-10-30 05:00:00} \\ + -format {%Y-%m-%d %H:%M:%S} -timezone :America/New_York] +set a [clock add $s 24 hours -timezone :America/New_York] +set x [clock format $a \\ + -format {%H:%M:%S} -timezone :America/New_York] +.CE +.PP +Adding and subtracting days and weeks is accomplished by converting +the given time to a calendar day and time of day in the appropriate +time zone and locale. The requisite number of days (weeks are converted +to days by multiplying by seven) is added to the calendar day, and +the date and time are then converted back to a count of seconds from +the epoch time. +.PP +Adding and subtracting a given number of days across the point that +the time changes at the start or end of summer time (Daylight Saving Time) +results in the \fIsame local time\fR on the day in question. For +instance, the following code sets the value of \fBx\fR to \fB05:00:00\fR. +.CS +set s [clock scan {2004-10-30 05:00:00} \\ + -format {%Y-%m-%d %H:%M:%S} -timezone :America/New_York] +set a [clock add $s 1 day -timezone :America/New_York] +set x [clock format $a \\ + -format {%H:%M:%S} -timezone :America/New_York] +.CE +.PP +In cases of ambiguity, where the same local time happens twice +on the same day, the earlier time is used. In cases where the conversion +yields an impossible time (for instance, 02:30 during the Spring +Daylight Saving Time change using US rules), the time is converted +as if the clock had not changed. Thus, the following code +will set the value of \fBx\fR to \fB03:30:00\fR. +.CS +set s [clock scan {2004-04-03 02:30:00} \\ + -format {%Y-%m-%d %H:%M:%S} -timezone :America/New_York] +set a [clock add $s 1 day -timezone :America/New_York] +set x [clock format $a \\ + -format {%H:%M:%S} -timezone :America/New_York] +.CE +.PP +Adding a given number of days or weeks works correctly across the conversion +between the Julian and Gregorian calendars; the omitted days are skipped. +The following code sets \fBz\fR to \fB1752-09-14\fR. +.CS +set x [clock scan 1752-09-02 -format %Y-%m-%d -locale en_US] +set y [clock add $x 1 day -locale en_US] +set z [clock format $y -format %Y-%m-%d -locale en_US] +.CE +.PP +In the bizarre case that adding the given number of days yields a date +that does not exist because it falls within the dropped days of the +Julian-to-Gregorian conversion, the date is converted as if it was +on the Julian calendar. +.PP +Adding a number of months, or a number of years, is similar; it +converts the given time to a calendar date and time of day. It then +adds the requisite number of months or years, and reconverts the resulting +date and time of day to an absolute time. +.PP +If the resulting date is impossible because the month has too few days +(for example, when adding 1 month to 31 January), the last day of the +month is substituted. Thus, adding 1 month to 31 January will result in +28 February in a common year or 29 February in a leap year. +.PP +The rules for handling anomalies relating to summer time and to the +Gregorian calendar are the same when adding/subtracting months and +years as they are when adding/subtracting days and weeks. +.PP +If multiple \fIcount unit\fR pairs are present on the command, they +are evaluated consecutively, from left to right. +.SH "HIGH RESOLUTION TIMERS" +Most of the subcommands supported by the \fBclock\fR command deal with +times represented as a count of seconds from the epoch time, and this is the +representation that \fBclock seconds\fR returns. There are three exceptions, +which are all intended for use where higher-resolution times are required. +\fBclock milliseconds\fR returns the count of milliseconds from the +epoch time, and \fBclock microseconds\fR returns the count of microseconds +from the epoch time. In addition, there js a \fBclock clicks\fR command +that returns a platform-dependent high-resolution timer. Unlike +\fBclock seconds\fR and \fBclock milliseconds\fR, the value +of \fBclock clicks\fR is not guaranteed to be tied to any fixed +epoch; it is simply intended to be the most precise interval timer +available, and is intended only for relative timing studies such as +benchmarks. +.SH "FORMATTING TIMES" +The \fBclock format\fR command produces times for display to a user +or writing to an external medium. The command accepts times that are +expressed in seconds from the epoch time of 1 January 1970, 00:00 UTC, +as returned by \fBclock seconds\fR, \fBclock scan\fR, \fBclock add\fR, +\fBfile atime\fR or \fBfile mtime\fR. +.PP +If a \fB-format\fR option is present, the following argument is +a string that specifies how the date and time are to be formatted. +The string consists +of any number of characters other than the per-cent sign ('\fI%\fR') +interspersed with any number of \fIformat groups\fR, which are two-character +sequences beginning with the per-cent sign. The permissible format groups, +and their interpretation, are described under \fBFORMAT GROUPS\fR. +.PP +If a \fB-timezone\fR option is present, the following +argument is a string that specifies the time zone in which the date and time +are to be formatted. As an alternative to \fB-timezone\fR \fI:UTC\fR, +the obsolete usage \fB-gmt\fR \fItrue\fR may be used. See +\fBTIME ZONES\fR for the permissible variants for the time zone. +.PP +If a \fB-locale\fR option is present, the following argument is +a string that specifies the locale in which the time is to be formatted, +in the same format that is used for the \fBmsgcat\fR command. Note +that the default, if \fB-locale\fR is not specified, is the root locale +\fB{}\fR rather than the current locale. The current locale may +be obtained by using \fB-locale\fR \fBcurrent\fR. +In addition, some platforms support a \fBsystem\fR locale that +reflects the user's current choices. For instance, on Windows, the +format that the user has selected from dates and times in the Control +Panel can be obtained by using the \fBsystem\fR locale. On +platforms that do not define a user selection of date and time formats +separate from \fBLC_TIME\fR, \fB-locale\fR \fBsystem\fR is +synonymous with \fB-locale\fR \fBcurrent\fR. +.SH "SCANNING TIMES" +The \fBclock scan\fR command accepts times that are formatted as +strings and converts them to counts of seconds from the epoch time +of 1 January 1970, 00:00 UTC. It normally takes a \fB-format\fR +option that is followed by a string describing +the expected format of the input. (See +\fBFREE FORM SCAN\fR for the effect of \fBclock scan\fR +without such an argument.) The string consists of any number of +characters other than the per-cent sign ('\fI%\fR'), +interspersed with any number of \fIformat groups\fR, which are two-character +sequences beginning with the per-cent sign. The permissible format groups, +and their interpretation, are described under \fBFORMAT GROUPS\fR. +.PP +If a \fB-timezone\fR option is present, the following +argument is a string that specifies the time zone in which the date and time +are to be interpreted. As an alternative to \fB-timezone\fR \fI:UTC\fR, +the obsolete usage \fB-gmt\fR \fItrue\fR may be used. See +\fBTIME ZONES\fR for the permissible variants for the time zone. +.PP +If a \fB-locale\fR option is present, the following argument is +a string that specifies the locale in which the time is to be interpreted, +in the same format that is used for the \fBmsgcat\fR command. Note +that the default, if \fB-locale\fR is not specified, is the root locale +\fB{}\fR rather than the current locale. The current locale may +be obtained by using \fB-locale\fR \fBcurrent\fR. +In addition, some platforms support a \fBsystem\fR locale that +reflects the user's current choices. For instance, on Windows, the +format that the user has selected from dates and times in the Control +Panel can be obtained by using the \fBsystem\fR locale. On +platforms that do not define a user selection of date and time formats +separate from \fBLC_TIME\fR, \fB-locale\fR \fBsystem\fR is +synonymous with \fB-locale\fR \fBcurrent\fR. +.PP +If a \fB-base\fR option is present, the following argument is +a time (expressed in seconds from the epoch time) that is used as +a \fIbase time\fR for interpreting relative times. If no +\fB-base\fR option is present, the base time is the current time. +.PP +Scanning of times in fixed format works by determining three things: +the date, the time of day, and the time zone. These three are then +combined into a point in time, which is returned as the number of seconds +from the epoch. +.PP +Before scanning begins, the format string is preprocessed +to replace \fB%c\fR, \fB%Ec\fR, \fB%x\fR, \fB%Ex\fR, +\fB%X\fR. \fB%Ex\fR, \fB%r\fR, \fB%R\fR, \fB%T\fR, +\fB%D\fR, \fB%EY\fR and \fB%+\fR format groups with counterparts +that are appropriate to the current locale and contain none of the +above groups. For instance, \fB%D\fR will (in the \fBen_US\fR locale) +be replaced with \fB%m/%d/%Y\fR. +.PP +The date is determined according to the fields that are present in the +preprocessed format string. In order of preference: +.IP [1] +If the string contains a \fB%s\fR format group, representing +seconds from the epoch, that group is used to determine the date. +.IP [2] +If the string contains a \fB%J\fR format group, representing +the Julian Day Number, that group is used to determine the date. +.IP [3] +If the string contains a complete set of format groups specifying +century, year, month, and day of month; century, year, and day of year; +or ISO8601 fiscal year, week of year, and day of week; those groups are +combined and used to determine the date. If more than one complete +set is present, the one at the rightmost position in the string is +used. +.IP [4] +If the string lacks a century but contains a set of format +groups specifying year of century, month and day of month; year of +century and day of year; or two-digit ISO8601 fiscal year, week of year, +and day of week; those groups are +combined and used to determine the date. If more than one complete +set is present, the one at the rightmost position in the string is +used. The year is presumed to lie in the range 1938 to 2037 inclusive. +.IP [5] +If the string entirely lacks any specification for the year, +but contains a set of format groups specifying month and day of month, +day of year, or week of year and day of week, those groups are +combined and used to determine the date. If more than one complete +set is present, the one at the rightmost position in the string is +used. The year is determined by interpreting the base time in the given +time zone. +.IP [6] +If the string contains none of the above sets, but has a day +of the month or day of the week, the day of the month or day of the week +are used to determine the date by interpreting the base time in the +given time zone and returning the given day of the current week or month. +(The week runs from Monday to Sunday, ISO8601-fashion.) If both day +of month and day of week are present, the day of the month takes +priority. +.IP [7] +If none of the above rules results in a usable date, the date +of the base time in the given time zone is used. +.PP +The time is also determined according to the fields that are present in the +preprocessed format string. In order of preference: +.IP [1] +If the string contains a \fB%s\fR format group, representing +seconds from the epoch, that group determines the time of day. +.IP [2] +If the string contains either an hour on the 24-hour clock +or an hour on the 12-hour clock plus an AM/PM indicator, that hour determines +the hour of the day. If the string further contains a group specifying +the minute of the hour, that group combines with the hour. If the string +further contains a group specifying the second of the minute, that group +combines with the hour and minute. +.IP [3] +If the string contains neither a \fB%s\fR format group nor +a group specifying the hour of the day, then midnight (\fB00:00\fR, the start +of the given date) is used. +The time zone is determined by either the \fB-timezone\fR or \fB-gmt\fR +options, or by using the current time zone. +.PP +If a format string lacks a \fB%z\fR or \fB%Z\fR format group, +it is possible for the time to be ambiguous because it appears twice +in the same day, once without and once with Daylight Saving Time. +If this situation occurs, the first occurrence of the time is chosen. +(For this reason, it is wise to have the input string contain the +time zone when converting local times. This caveat does not apply to +UTC times.) +.SH "FORMAT GROUPS" +The following format groups are recognized by the \fBclock scan\fR and +\fBclock format\fR commands. +.TP +\fB%a\fR +On output, receives an abbreviation (\fIe.g.,\fR \fBMon\fR) for the day +of the week in the given locale. On input, matches the name of the day +of the week in the given locale (in either abbreviated or full form, or +any unique prefix of either form). +.TP +\fB%A\fR +On output, receives the full name (\fIe.g.,\fR \fBMonday\fR) of the day +of the week in the given locale. On input, matches the name of the day +of the week in the given locale (in either abbreviated or full form, or +any unique prefix of either form). +.TP +\fB%b\fR +On output, receives an abbreviation (\fIe.g.,\fR \fBJan\fR) for the name +of the month in the given locale. On input, matches the name of the month +in the given locale (in either abbreviated or full form, or +any unique prefix of either form). +.TP +\fB%B\fR +On output, receives the full name (\fIe.g.,\fR \fBJanuary\fR) +of the month in the given locale. On input, matches the name of the month +in the given locale (in either abbreviated or full form, or +any unique prefix of either form). +.TP +\fB%c\fR +On output, receives a localized representation of date and time of day; +the localized representation is expected to use the Gregorian calendar. +On input, matches whatever %c produces. +.TP +\fB%C\fR +On output, receives the number of the century in Indo-Arabic numerals. +On input, matches one or two digits, possibly with leading whitespace, +that are expected to be the number of the century. +.TP +\fB%d\fR +On output, produces the number of the day of the month, as two decimal +digits. On input, matches one or two digits, possibly with leading +whitespace, that are expected to be the number of the day of the month. +.TP +\fB%D\fR +This format group is synonymous with \fB%m/%d/%Y\fR. It should be +used only in exchanging data within the \fBen_US\fR locale, since +other locales typically do not use this order for the fields of the date. .TP -\fBclock scan \fIdateString\fR ?\fB\-base \fIclockVal\fR? ?\fB\-gmt \fIboolean\fR? -Convert \fIdateString\fR to an integer clock value (see \fBclock seconds\fR). -This command can parse and convert virtually any standard date and/or time -string, which can include standard time zone mnemonics. If only a time is -specified, the current date is assumed. If the string does not contain a -time zone mnemonic, the local time zone is assumed, unless the \fB\-gmt\fR +\fB%e\fR +On output, produces the number of the day of the month, as one or +two decimal digits (with a leading blank for one-digit dates). +On input, matches one or two digits, possibly with leading +whitespace, that are expected to be the number of the day of the month. +.TP +\fB%Ec\fR +On output, produces a locale-dependent representation of the date and +time of day in the locale's alternative calendar. On input, matches +whatever %Ec produces. The locale's alternative calendar need not +be the Gregorian calendar. +.TP +\fB%EC\fR +On output, produces a locale-dependent name of an era in the locale's +alternative calendar. On input, matches the name of the era or any +unique prefix. +.TP +\fB%Ex\fR +On output, produces a locale-dependent representation of the date +in the locale's alternative calendar. On input, matches +whatever %Ex produces. The locale's alternative calendar need not +be the Gregorian calendar. +.TP +\fB%EX\fR +On output, produces a locale-dependent representation of the +time of day in the locale's alternative numerals. On input, matches +whatever %EX produces. +.TP +\fB%Ey\fR +On output, produces a locale-dependent number of the year of the era +in the locale's alternative calendar and numerals. On input, matches +such a number. +.TP +\fB%EY\fR +On output, produces a representation of the year in the locale's +alternative calendar and numerals. On input, matches what \fB%EY\fR +produces. Often synonymous with \fB%EC%Ey\fR. +.TP +\fB%g\fR +On output, produces a two-digit year number suitable for use with +the week-based ISO8601 calendar; that is, the year number corresponds +to the week number produced by \fB%V\fR. On input, accepts such +a two-digit year number, possibly with leading whitespace. +.TP +\fB%G\fR +On output, produces a four-digit year number suitable for use with +the week-based ISO8601 calendar; that is, the year number corresponds +to the week number produced by \fB%V\fR. On input, accepts such +a four-digit year number, possibly with leading whitespace. +.TP +\fB%h\fR +This format group is synonymous with \fB%b\fR. +.TP +\fB%H\fR +On output, produces a two-digit number giving the hour of the day +(00-23) on a 24-hour clock. On input, accepts such a number. +.TP +\fB%I\fR +On output, produces a two-digit number giving the hour of the day +(12-11) on a 12-hour clock. On input, accepts such a number. +.TP +\fB%j\fR +On output, produces a three-digit number giving the day of the year +(001-366). On input, accepts such a number. +.TP +\fB%J\fR +On output, produces a string of digits giving the Julian Day Number. +On input, accepts a string of digits and interprets it as a Julian Day Number. +The Julian Day Number is a count of the number of calendar days +that have elapsed since 1 January, 4713 BCE of the proleptic +Julian calendar. The epoch time of 1 January 1970 corresponds +to Julian Day Number 2440588. +.TP +\fB%k\fR +On output, produces a one- or two-digit number giving the hour of the day +(0-23) on a 24-hour clock. On input, accepts such a number. +.TP +\fB%l\fR +On output, produces a one- or two-digit number giving the hour of the day +(12-11) on a 12-hour clock. On input, accepts such a number. +.TP +\fB%m\fR +On output, produces the number of the month (01-12) with exactly two +digits. On input, accepts two digits and interprets them as the number +of the month. +.TP +\fB%M\fR +On output, produces the number of the minute of the hour (00-59) +with exactly two digits. On input, accepts two digits and interprets them +as the number of the minute of the hour. +.TP +\fB%N\fR +On output, produces the number of the month (1-12) with one or two digits. +digits. On input, accepts one or two digits, possibly with leading whitespace, +and interprets them as the number of the month. +.TP +\fB%Od\fR, \fB%Oe\fR, \fB%OH\fR, \fB%OI\fR, \fB%Ok\fR, \fB%Ol\fR, \fB%Om\fR, \fB%OM\fR, \fB%OS\fR, \fB%Ou\fR, \fB%Ow\fR, \fB%Oy\fR +All of these format groups are synonymous with their counterparts +without the '\fBO\fR', except that the string is produced and parsed in the +locale-dependent alternative numerals. +.TP +\fB%p\fR +On output, produces an indicator for the part of the day, \fBA.M.\fR +or \fBP.M.\fR, appropriate to the given locale. If the script of the +given locale supports multiple letterforms, uppercase is preferred. +On input, matches the representation \fBA.M.\fR or \fBP.M.\fR in +the given locale, in either case. +.TP +\fB%P\fR +On output, produces an indicator for the part of the day, \fBA.M.\fR +or \fBP.M.\fR, appropriate to the given locale. If the script of the +given locale supports multiple letterforms, lowercase is preferred. +On input, matches the representation \fBA.M.\fR or \fBP.M.\fR in +the given locale, in either case. +.TP +\fB%Q\fR +This format group is reserved for internal use within the Tcl library. +.TP +\fB%r\fR +On output, produces a locale-dependent time of day representation on a +12-hour clock. On input, accepts whatever \fB%r\fR produces. +.TP +\fB%R\fR +On output, produces a locale-dependent time of day representation on a +24-hour clock. On input, accepts whatever \fB%R\fR produces. +.TP +\fB%s\fR +On output, simply formats the \fItimeVal\fR argument as a decimal +integer and inserts it into the output string. On input, accepts +a decimal integer and uses is as the time value without any further +processing. Since \fB%s\fR uniquely determines a point in time, it +overrides all other input formats. +.TP +\fB%S\fR +On output, produces a two-digit number of the second of the minute +(00-59). On input, accepts two digits and uses them as the second of the +minute. +.TP +\fB%t\fR +On output, produces a TAB character. On input, matches a TAB character. +.TP +\fB%T\fR +Synonymous with \fB%H:%M:%S\fR. +.TP +\fB%u\fR +On output, produces the number of the day of the week +(\fB1\fR-Monday, \fB7\fR-Sunday). On input, accepts a single digit and +interprets it as the day of the week. Sunday may be either \fB0\fR or +\fB7\fR. +.TP +\fB%U\fR +On output, produces the ordinal number of the week of the year +(00-53). The first Sunday of the year is the first day of week 01. On +input accepts two digits which are otherwise ignored. This format +group is never used in determining an input date. This interpretation +of the week of the year was once common in US banking but is now +largely obsolete. See \fB%V\fR for the ISO8601 week number. +.TP +\fB%V\fR +On output, produces the number of the ISO8601 week as a two digit +number (01-53). Week 01 is the week containing January 4; or the first +week of the year containing at least 4 days; or the week containing +the first Thursday of the year (the three statements are +equivalent). Each week begins on a Monday. On input, accepts the +ISO8601 week number. +.TP +\fB%w\fR +On output, produces a week number (00-53) within the year; week 01 +begins on the first Monday of the year. On input, accepts two digits, +which are otherwise ignored. This format group is never used in +determining an input date. It is not the ISO8601 week number; that +week is produced and accepted by \fB%V\fR. +.TP +\fB%x\fR +On output, produces the date in a locale-dependent representation. On +input, accepts whatever \fB%x\fR produces and is used to determine +calendar date. +.TP +\fB%X\fR +On output, produces the time of day in a locale-dependent +representation. On input, accepts whatever \fB%X\fR produces and is used +to determine time of day. +.TP +\fB%y\fR +On output, produces the two-digit year of the century. On input, +accepts two digits, and is used to determine calendar date. The +date is presumed to lie between 1938 and 2037 inclusive. Note +that \fB%y\fR does not yield a year appropriate for use with the ISO8601 +week number \fB%V\fR; programs should use \fB%g\fR for that purpose. +.TP +\fB%Y\fR +On output, produces the four-digit calendar year. On input, +accepts four digits and may be used to determine calendar date. Note +that \fB%Y\fR does not yield a year appropriate for use with the ISO8601 +week number \fB%V\fR; programs should use \fB%G\fR for that purpose. +.TP +\fB%z\fR +On output, produces the current time zone, expressed in hours and +minutes east (+hhmm) or west (-hhmm) of Greenwich. On input, accepts a +time zone specifier (see \fBTIME ZONES\fR below) that will be used to +determine the time zone. +.TP +\fB%Z\fR +On output, produces the current time zone's name, possibly +translated to the given locale. On input, accepts a time zone +specifier (see \fBTIME ZONES\fR below) that will be used to determine the +time zone. This option should, in general, be used on input only when +parsing RFC822 dates. Other uses are fraught with ambiguity; for +instance, the string \fBBST\fR may represent British Summer Time or +Brazilian Standard Time. It is recommended that date/time strings for +use by computers use numeric time zones instead. +.TP +\fB%%\fR +On output, produces a literal '\fB%\fR' charater. On input, matches +a literal '\fB%\fR' character. +.TP +\fB%+\fR +Synonymous with '\fB%a %b %e %H:%M:%S %Z %Y\fR'. +.SH "TIME ZONES" +When the \fBclock\fR command is processing a local time, it has several +possible sources for the time zone to use. In order of preference, they +are: +.IP [1] +A time zone specified inside a string being parsed and matched by a \fB%z\fR +or \fB%Z\fR format group. +.IP [2] +A time zone specified with the \fB-timezone\fR option to the \fBclock\fR +command (or, equivalently, by \fB-gmt\fR \fB1\fR). +.IP [3] +A time zone specified in an environment variable \fBTCL_TZ\fR. +.IP [4] +A time zone specified in an environment variable \fBTZ\fR. +.IP [5] +The local time zone from the Control Panel on Windows systems. +.IP [6] +The C library's idea of the local time zone, as defined by the +\fBmktime\fR and \fBlocaltime\fR functions. +.PP +Whatever the source of the time zone string, the same set of rules +is used to parse it. First, if it was obtained from a \fB%z\fR +or \fB%Z\fR format group, it is checked to see if it is one of +the strings, +.CS + gmt ut utc bst wet wat at + nft nst ndt ast adt est edt + cst cdt mst mdt pst pdt yst + ydt hst hdt cat ahst nt idlw + cet cest met mewt mest swt sst + eet eest bt it zp4 zp5 ist + zp6 wast wadt jt cct jst cast + cadt east eadt gst nzt nzst nzdt + idle +.CE +If it is a string in the above list, it designates a known +time zone, and is interpreted as such. +.PP +The next check is for a string beginning with a colon. +If the time zone begins with a colon, it is one of a +standardized list of names like \fB:America/New_York\fR +that give the rules for various locales. A complete list +of the location names is too lengthy to be listed here. +On most Tcl installations, the definitions of the locations +are to be found in named files in the directory +"\fI/no_backup/tools/lib/tcl8.5/clock/tzdata\fR". On some Unix systems, these +files are omitted, and the definitions are instead +obtained from system files in "\fI/usr/share/zoneinfo\fR", +"\fI/usr/share/lib/zoneinfo\fR" or "\fI/usr/local/etc/zoneinfo\fR". +As a special case, the name \fB:localtime\fR refers to +the local time zone as defined by the C library. +.PP +A string consisting of a plus or minus sign followed by +four or six decimal digits is interpreted as an offset in +hours, minutes, and seconds (if six digits are present) from +UTC. The plus sign denotes a sign east of Greenwich; +the minus sign one west of Greenwich. +.PP +A string conforming to the Posix specification of the \fBTZ\fR +environment variable will be recognized. The specification +may be found at +\fIhttp://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html\fR. +.PP +Any other string is processed by prefixing a colon and attempting +to use it as a location name, as above. +.SH "LOCALIZATION" +Developers wishing to localize the date and time formatting and parsing +are referred to \fIhttp://www.tcl.tk/cgi-bin/tct/tip/173\fR for a +specification. +.SH "FREE FORM SCAN" +If the \fBclock scan\fR command is invoked without a \fB-format\fR +option, then it requests a \fIfree-form scan.\fR \fI +This form of scan is deprecated.\fR The reason for the deprecation +is that there are too many ambiguities. (Does the string '2000' +represent a year, a time of day, or a quantity?) No set of rules +for interpreting free-form dates and times has been found to +give unsurprising results in all cases. +.PP +If free-form scan is used, only the \fB-base\fR and \fB-gmt\fR +options are accepted. The \fB-timezone\fR and \fB-locale\fR +options will result in an error if \fB-format\fR is not supplied. +.PP +For the benefit of users who need to understand legacy code that +uses free-form scan, the documentation for how free-form scan +interprets a string is included here: +.PP +If only a time is +specified, the current date is assumed. If the \fIinputString\fR +does not contain a +time zone mnemonic, the local time zone is assumed, unless the \fB-gmt\fR argument is true, in which case the clock value is calculated assuming that the specified time is relative to Greenwich Mean Time. \fB-gmt\fR, if specified, affects only the computed time value; it does not impact the interpretation of \fB-base\fR. -.sp -If the \fB\-base\fR flag is specified, the next argument should contain +.PP +If the \fB-base\fR flag is specified, the next argument should contain an integer clock value. Only the date in this value is used, not the time. This is useful for determining the time on a specific day or doing other date-relative conversions. -.sp -The \fIdateString\fR consists of zero or more specifications of the +.PP +The \fIinputString\fR argument consists of zero or more specifications of the following form: -.RS .TP \fItime\fR -A time of day, which is of the form: \fIhh\fR?\fI:mm\fR?\fI:ss\fR?? -?\fImeridian\fR? ?\fIzone\fR? or \fIhhmm \fR?\fImeridian\fR? -?\fIzone\fR?. If no meridian is specified, \fIhh\fR is interpreted on +A time of day, which is of the form: \fBhh?:mm?:ss?? ?meridian? ?zone?\fR +or \fBhhmm ?meridian? ?zone?\fR +If no meridian is specified, \fBhh\fR is interpreted on a 24-hour clock. .TP \fIdate\fR A specific month and day with optional year. The -acceptable formats are \fImm/dd\fR?\fI/yy\fR?, \fImonthname dd\fR -?, \fIyy\fR?, \fIdd monthname \fR?\fIyy\fR?, \fIday, dd monthname -yy\fR, \fI?CC?yymmdd\fR, \fI?CC?yy-mm-dd\fR, \fIdd-monthname-?CC?yy\fR. +acceptable formats are "\fBmm/dd?/yy?\fR", "\fBmonthname dd?, yy?\fR", +"\fBday, dd monthname ?yy?\fR", "\fBdd monthname yy\fR", +"\fB?CC?yymmdd\fR", and "\fBdd-monthname-?CC?yy\fR. The default year is the current year. If the year is less than 100, we treat the years 00-68 as 2000-2068 and the years 69-99 as 1969-1999. Not all platforms can represent the years 38-70, so an error may result if these years are used. .TP \fIISO 8601 point-in-time\fR -An ISO 8601 point-in-time specification, such as \fICCyymmddThhmmss\fR, where -T is the literal T, \fICCyymmdd hhmmss\fR, or -\fICCyymmddThh:mm:ss\fR. +An ISO 8601 point-in-time specification, such as \fBCCyymmddThhmmss\fR, +where \fBT\fR is the literal T, "\fBCCyymmdd hhmmss\fR", or +\fBCCyymmddThh:mm:ss\fR. .TP \fIrelative time\fR -A specification relative to the current time. The format is \fInumber -unit\fR acceptable units are \fByear\fR, \fBfortnight\fR, \fBmonth\fR, \fBweek\fR, \fBday\fR, +A specification relative to the current time. The format is \fBnumber +unit\fR. Acceptable units are \fByear\fR, \fBfortnight\fR, \fBmonth\fR, \fBweek\fR, \fBday\fR, \fBhour\fR, \fBminute\fR (or \fBmin\fR), and \fBsecond\fR (or \fBsec\fR). The unit can be specified as a singular or plural, as in \fB3 weeks\fR. These modifiers may also be specified: \fBtomorrow\fR, \fByesterday\fR, \fBtoday\fR, \fBnow\fR, \fBlast\fR, \fBthis\fR, \fBnext\fR, \fBago\fR. -.RE -.sp -.RS The actual date is calculated according to the following steps. +.PP First, any absolute date and/or time is processed and converted. Using that time as the base, day-of-week specifications are added. Next, relative specifications are used. If a date or day is @@ -255,38 +825,20 @@ used. Finally, a correction is applied so that the correct hour of the day is produced after allowing for daylight savings time differences and the correct date is given when going from the end of a long month to a short month. -.sp +.PP Daylight savings time correction is applied only when the relative time is specified in units of days or more, ie, days, weeks, fortnights, months or years. This means that when crossing the daylight savings time boundary, different results will be given for \fBclock scan "1 day"\fR and \fBclock scan "24 hours"\fR: .CS -.ta 6c -\fB% clock scan "1 day" -base [clock scan 1999-10-31] +% clock scan "1 day" -base [clock scan 1999-10-31] 941443200 % clock scan "24 hours" -base [clock scan 1999-10-31] -941439600\fR -.CE -.RE -.TP -\fBclock seconds\fR -Return the current date and time as a system-dependent integer value. The -unit of the value is seconds, allowing it to be used for relative time -calculations. The value is usually defined as total elapsed time from -an ``epoch''. You shouldn't assume the value of the epoch. -.SH EXAMPLE -Print out the current date and time, first using the default format -and then using an ISO 8601 format: -.CS -set now [clock seconds] -set isoFmt "%Y-%m-%dT%H:%M:%SZ" -puts "DEFAULT: [clock format $now]" -puts "ISO8601: [clock format $now -format $isoFmt -gmt 1]" +941439600 .CE - .SH "SEE ALSO" -date(1), time(n) +msgcat +.SH "COPYRIGHT" +Copyright (c) 2004 Kevin B. Kenny . All rights reserved. -.SH KEYWORDS -clock, date, time diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 004e34c..63b709a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.111 2004/08/02 20:55:36 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.112 2004/08/18 19:58:58 kennykb Exp $ */ #include "tclInt.h" @@ -71,8 +71,6 @@ static CmdInfo builtInCmds[] = { (CompileProc *) NULL, 1}, {"catch", (Tcl_CmdProc *) NULL, Tcl_CatchObjCmd, TclCompileCatchCmd, 1}, - {"clock", (Tcl_CmdProc *) NULL, Tcl_ClockObjCmd, - (CompileProc *) NULL, 1}, {"concat", (Tcl_CmdProc *) NULL, Tcl_ConcatObjCmd, (CompileProc *) NULL, 1}, {"continue", (Tcl_CmdProc *) NULL, Tcl_ContinueObjCmd, @@ -231,6 +229,30 @@ static CmdInfo builtInCmds[] = { {NULL, (Tcl_CmdProc *) NULL, (Tcl_ObjCmdProc *) NULL, (CompileProc *) NULL, 0} }; + +static const CmdInfo clockCmds [] = { + /* + * Commands in the '::tcl::clock' namespace that support the + * 'clock' ensemble + */ + + { "::tcl::clock::clicks", (Tcl_CmdProc*) NULL, + TclClockClicksObjCmd, (CompileProc*) NULL, 0 }, + { "::tcl::clock::microseconds", (Tcl_CmdProc*) NULL, + TclClockMicrosecondsObjCmd, (CompileProc*) NULL, 0 }, + { "::tcl::clock::milliseconds", (Tcl_CmdProc*) NULL, + TclClockMillisecondsObjCmd, (CompileProc*) NULL, 0 }, + { "::tcl::clock::seconds", (Tcl_CmdProc*) NULL, + TclClockSecondsObjCmd, (CompileProc*) NULL, 0 }, + { "::tcl::clock::Localtime", (Tcl_CmdProc*) NULL, + TclClockLocaltimeObjCmd, (CompileProc*) NULL, 0 }, + { "::tcl::clock::Mktime", (Tcl_CmdProc*) NULL, + TclClockMktimeObjCmd, (CompileProc*) NULL, 0 }, + { "::tcl::clock::Oldscan", (Tcl_CmdProc*) NULL, + TclClockOldscanObjCmd, (CompileProc*) NULL, 0 }, + { NULL, (Tcl_CmdProc *) NULL, + (Tcl_ObjCmdProc *) NULL, (CompileProc *) NULL, 0 } +}; /* *---------------------------------------------------------------------- @@ -260,7 +282,7 @@ Tcl_CreateInterp() BuiltinFunc *builtinFuncPtr; MathFunc *mathFuncPtr; Tcl_HashEntry *hPtr; - CmdInfo *cmdInfoPtr; + const CmdInfo *cmdInfoPtr; int i; union { char c[sizeof(short)]; @@ -472,6 +494,24 @@ Tcl_CreateInterp() } /* + * Register the clock commands. These *do* go through + * Tcl_CreateObjCommand, since they aren't in the global namespace. + */ + + for ( cmdInfoPtr = clockCmds; cmdInfoPtr->name != NULL; cmdInfoPtr++) { + if ( cmdInfoPtr->objProc == NULL ) { + Tcl_CreateCommand( interp, cmdInfoPtr->name, + cmdInfoPtr->proc, (ClientData) NULL, + (Tcl_CmdDeleteProc*) NULL ); + } else { + Tcl_CreateObjCommand( interp, cmdInfoPtr->name, + cmdInfoPtr->objProc, (ClientData) NULL, + (Tcl_CmdDeleteProc*) NULL ); + } + } + + + /* * Register the builtin math functions. */ @@ -605,7 +645,7 @@ int TclHideUnsafeCommands(interp) Tcl_Interp *interp; /* Hide commands in this interpreter. */ { - register CmdInfo *cmdInfoPtr; + register const CmdInfo *cmdInfoPtr; if (interp == (Tcl_Interp *) NULL) { return TCL_ERROR; @@ -615,6 +655,11 @@ TclHideUnsafeCommands(interp) Tcl_HideCommand(interp, cmdInfoPtr->name, cmdInfoPtr->name); } } + for (cmdInfoPtr = clockCmds; cmdInfoPtr->name != NULL; cmdInfoPtr++) { + if (!cmdInfoPtr->isSafe) { + Tcl_HideCommand(interp, cmdInfoPtr->name, cmdInfoPtr->name); + } + } return TCL_OK; } diff --git a/generic/tclClock.c b/generic/tclClock.c index 67570df..91f204b 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -7,17 +7,34 @@ * * Copyright 1991-1995 Karl Lehenbauer and Mark Diekhans. * Copyright (c) 1995 Sun Microsystems, Inc. + * Copyright (c) 2004 by Kevin B. Kenny. All rights reserved. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.28 2004/05/14 21:43:28 kennykb Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.29 2004/08/18 19:58:59 kennykb Exp $ */ #include "tclInt.h" /* - * The date parsing stuff uses lexx and has tons o statics. + * Windows has mktime. The configurators do not check. + */ + +#ifdef WIN32 +#define HAVE_MKTIME +#endif + +/* + * Thread specific data block holding a 'struct tm' for the 'gmtime' + * and 'localtime' library calls. + */ + +static Tcl_ThreadDataKey tmKey; + +/* + * Mutex protecting 'gmtime', 'localtime' and 'mktime' calls + * and the statics in the date parsing code. */ TCL_DECLARE_MUTEX(clockMutex) @@ -26,358 +43,580 @@ TCL_DECLARE_MUTEX(clockMutex) * Function prototypes for local procedures in this file: */ -static int FormatClock _ANSI_ARGS_((Tcl_Interp *interp, - unsigned long clockVal, int useGMT, - char *format)); +static struct tm* ThreadSafeLocalTime _ANSI_ARGS_(( CONST time_t* )); +static void TzsetIfNecessary _ANSI_ARGS_(( void )); /* *------------------------------------------------------------------------- * - * Tcl_ClockObjCmd -- + * TclClockLocaltimeObjCmd -- + * + * Tcl command that extracts local time using the C library to do + * it. * - * This procedure is invoked to process the "clock" Tcl command. - * See the user documentation for details on what it does. + * Usage: + * ::tcl::clock::Localtime + * + * Parameters: + * -- A count of seconds from the Posix epoch. * * Results: - * A standard Tcl result. + * Returns a standard Tcl result. The object result is a Tcl + * list containing the year, month, day, hour, minute, and second + * fields of the local time. It may return an error if the + * argument exceeds the arithmetic range representable by + * 'time_t'. * * Side effects: - * See the user documentation. + * None. + * + * This function is used as a call of last resort if the current time + * zone cannot be determined from environment variables TZ or TCL_TZ. + * It attempts to use the 'localtime' library function to extract the + * time and return it that way. This method suffers from Y2038 problems + * on most platforms. It also provides no portable way to get the + * name of the time zone. * *------------------------------------------------------------------------- */ int -Tcl_ClockObjCmd (client, interp, objc, objv) - ClientData client; /* Not used. */ - Tcl_Interp *interp; /* Current interpreter. */ - int objc; /* Number of arguments. */ - Tcl_Obj *CONST objv[]; /* Argument values. */ +TclClockLocaltimeObjCmd( ClientData clientData, + /* Unused */ + Tcl_Interp* interp, + /* Tcl interpreter */ + int objc, + /* Parameter count */ + Tcl_Obj* CONST* objv ) + /* Parameter vector */ { - Tcl_Obj *resultPtr; - int index; - Tcl_Obj *CONST *objPtr; - int useGMT = 0; - char *format = "%a %b %d %X %Z %Y"; - int clickType = 2; - int dummy; - unsigned long baseClock, clockVal; - long zone; - Tcl_Obj *baseObjPtr = NULL; - char *scanStr; - Tcl_Time now; /* Current time */ + Tcl_WideInt tick; /* Time to convert */ + time_t tock; + struct tm* timeVal; /* Time after conversion */ - static CONST char *switches[] = { - "clicks", "format", "scan", "seconds", (char *) NULL - }; - enum command { - COMMAND_CLICKS, COMMAND_FORMAT, COMMAND_SCAN, COMMAND_SECONDS - }; - static CONST char *clicksSwitches[] = { - "-milliseconds", "-microseconds", (char*) NULL - }; - static CONST char *formatSwitches[] = { - "-format", "-gmt", (char *) NULL - }; - static CONST char *scanSwitches[] = { - "-base", "-gmt", (char *) NULL - }; + Tcl_Obj* returnVec[ 6 ]; + + /* Check args */ - resultPtr = Tcl_GetObjResult(interp); - if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); + if ( objc != 2 ) { + Tcl_WrongNumArgs( interp, 1, objv, "seconds" ); return TCL_ERROR; } - - if (Tcl_GetIndexFromObj(interp, objv[1], switches, "option", 0, &index) - != TCL_OK) { + if ( Tcl_GetWideIntFromObj( interp, objv[1], &tick ) != TCL_OK ) { return TCL_ERROR; } - switch ((enum command) index) { - case COMMAND_CLICKS: { /* clicks */ - if (objc == 3) { - if (Tcl_GetIndexFromObj(interp, objv[2], clicksSwitches, - "option", 0, &clickType) != TCL_OK) { - return TCL_ERROR; - } - } else if (objc != 2) { - Tcl_WrongNumArgs(interp, 2, objv, "?option?"); - return TCL_ERROR; - } - switch (clickType) { - case 0: /* milliseconds */ - Tcl_GetTime(&now); - Tcl_SetWideIntObj(resultPtr, - ((Tcl_WideInt) now.sec * 1000 + now.usec / 1000)); - break; - case 1: /* microseconds */ - Tcl_GetTime(&now); - Tcl_SetWideIntObj(resultPtr, - ((Tcl_WideInt) now.sec * 1000000 + now.usec)); - break; - case 2: /* native clicks */ - Tcl_SetWideIntObj(resultPtr, (Tcl_WideInt) TclpGetClicks()); - break; - } - return TCL_OK; - } + /* Convert the time, checking for overflow */ - case COMMAND_FORMAT: /* format */ - if ((objc < 3) || (objc > 7)) { - wrongFmtArgs: - Tcl_WrongNumArgs(interp, 2, objv, - "clockval ?-format string? ?-gmt boolean?"); - return TCL_ERROR; - } + tock = (time_t) tick; + if ( (Tcl_WideInt) tock != tick ) { + Tcl_SetObjResult + ( interp, + Tcl_NewStringObj("number too large to represent as a Posix time", + -1) ); + Tcl_SetErrorCode( interp, "CLOCK", "argTooLarge", (char*) NULL ); + return TCL_ERROR; + } + TzsetIfNecessary(); + timeVal = ThreadSafeLocalTime( &tock ); + + /* Package the results */ + + returnVec[0] = Tcl_NewIntObj( timeVal->tm_year + 1900 ); + returnVec[1] = Tcl_NewIntObj( timeVal->tm_mon + 1); + returnVec[2] = Tcl_NewIntObj( timeVal->tm_mday ); + returnVec[3] = Tcl_NewIntObj( timeVal->tm_hour ); + returnVec[4] = Tcl_NewIntObj( timeVal->tm_min ); + returnVec[5] = Tcl_NewIntObj( timeVal->tm_sec ); + Tcl_SetObjResult( interp, Tcl_NewListObj( 6, returnVec ) ); + return TCL_OK; - if (Tcl_GetLongFromObj(interp, objv[2], (long*) &clockVal) - != TCL_OK) { - return TCL_ERROR; - } +} + +/* + *---------------------------------------------------------------------- + * + * ThreadSafeLocalTime -- + * + * Wrapper around the 'localtime' library function to make it thread + * safe. + * + * Results: + * Returns a pointer to a 'struct tm' in thread-specific data. + * + * Side effects: + * Invokes localtime or localtime_r as appropriate. + * + *---------------------------------------------------------------------- + */ - objPtr = objv+3; - objc -= 3; - while (objc > 1) { - if (Tcl_GetIndexFromObj(interp, objPtr[0], formatSwitches, - "switch", 0, &index) != TCL_OK) { - return TCL_ERROR; - } - switch (index) { - case 0: /* -format */ - format = Tcl_GetStringFromObj(objPtr[1], &dummy); - break; - case 1: /* -gmt */ - if (Tcl_GetBooleanFromObj(interp, objPtr[1], - &useGMT) != TCL_OK) { - return TCL_ERROR; - } - break; - } - objPtr += 2; - objc -= 2; - } - if (objc != 0) { - goto wrongFmtArgs; - } - return FormatClock(interp, (unsigned long) clockVal, useGMT, - format); - - case COMMAND_SCAN: /* scan */ - if ((objc < 3) || (objc > 7)) { - wrongScanArgs: - Tcl_WrongNumArgs(interp, 2, objv, - "dateString ?-base clockValue? ?-gmt boolean?"); - return TCL_ERROR; - } +static struct tm * +ThreadSafeLocalTime(timePtr) + CONST time_t *timePtr; /* Pointer to the number of seconds + * since the local system's epoch + */ - objPtr = objv+3; - objc -= 3; - while (objc > 1) { - if (Tcl_GetIndexFromObj(interp, objPtr[0], scanSwitches, - "switch", 0, &index) != TCL_OK) { - return TCL_ERROR; - } - switch (index) { - case 0: /* -base */ - baseObjPtr = objPtr[1]; - break; - case 1: /* -gmt */ - if (Tcl_GetBooleanFromObj(interp, objPtr[1], - &useGMT) != TCL_OK) { - return TCL_ERROR; - } - break; - } - objPtr += 2; - objc -= 2; - } - if (objc != 0) { - goto wrongScanArgs; - } +{ + /* + * Get a thread-local buffer to hold the returned time. + */ - if (baseObjPtr != NULL) { - if (Tcl_GetLongFromObj(interp, baseObjPtr, - (long*) &baseClock) != TCL_OK) { - return TCL_ERROR; - } - } else { - baseClock = TclpGetSeconds(); - } + struct tm *tmPtr = (struct tm *) + Tcl_GetThreadData(&tmKey, (int) sizeof(struct tm)); +#ifdef HAVE_LOCALTIME_R + localtime_r(timePtr, tmPtr); +#else + Tcl_MutexLock(&clockMutex); + memcpy((VOID *) tmPtr, (VOID *) localtime(timePtr), sizeof(struct tm)); + Tcl_MutexUnlock(&clockMutex); +#endif + return tmPtr; +} + +/* + *---------------------------------------------------------------------- + * + * TclClockMktimeObjCmd -- + * + * Determine seconds from the epoch, given the fields of a local + * time. + * + * Usage: + * mktime + * + * Parameters: + * year -- Calendar year + * month -- Calendar month + * day -- Calendar day + * hour -- Hour of day (00-23) + * minute -- Minute of hour + * second -- Second of minute + * + * Results: + * Returns the given local time. + * + * Errors: + * Returns an error if the 'mktime' function does not exist in the + * C library, or if the given time cannot be converted. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ - if (useGMT) { - zone = -50000; /* Force GMT */ - } else { - zone = TclpGetTimeZone((unsigned long) baseClock); - } +int +TclClockMktimeObjCmd( ClientData clientData, + /* Unused */ + Tcl_Interp* interp, + /* Tcl interpreter */ + int objc, + /* Parameter count */ + Tcl_Obj* CONST* objv ) + /* Parameter vector */ +{ + int i; + struct tm toConvert; /* Time to be converted */ + time_t convertedTime; /* Time converted from mktime */ - scanStr = Tcl_GetStringFromObj(objv[2], &dummy); - Tcl_MutexLock(&clockMutex); - if (TclGetDate(scanStr, (unsigned long) baseClock, zone, - (unsigned long *) &clockVal) < 0) { - Tcl_MutexUnlock(&clockMutex); - Tcl_AppendStringsToObj(resultPtr, - "unable to convert date-time string \"", - scanStr, "\"", (char *) NULL); - return TCL_ERROR; - } - Tcl_MutexUnlock(&clockMutex); +#ifndef HAVE_MKTIME + Tcl_SetObjResult( interp, + Tcl_NewStringObj( "cannot determine local time", -1 ) ); + return TCL_ERROR; +#else - Tcl_SetLongObj(resultPtr, (long) clockVal); - return TCL_OK; + /* Convert parameters */ - case COMMAND_SECONDS: /* seconds */ - if (objc != 2) { - Tcl_WrongNumArgs(interp, 2, objv, NULL); - return TCL_ERROR; - } - Tcl_SetLongObj(resultPtr, (long) TclpGetSeconds()); - return TCL_OK; - default: - return TCL_ERROR; /* Should never be reached. */ + if ( objc != 7 ) { + Tcl_WrongNumArgs( interp, 1, objv, + "year month day hour minute second" ); + return TCL_ERROR; + } + if ( Tcl_GetIntFromObj( interp, objv[1], &i ) != TCL_OK ) { + return TCL_ERROR; + } + toConvert.tm_year = i - 1900; + if ( Tcl_GetIntFromObj( interp, objv[2], &i ) != TCL_OK ) { + return TCL_ERROR; } + toConvert.tm_mon = i; + if ( Tcl_GetIntFromObj( interp, objv[3], &i ) != TCL_OK ) { + return TCL_ERROR; + } + toConvert.tm_mday = i; + if ( Tcl_GetIntFromObj( interp, objv[4], &i ) != TCL_OK ) { + return TCL_ERROR; + } + toConvert.tm_hour = i; + if ( Tcl_GetIntFromObj( interp, objv[5], &i ) != TCL_OK ) { + return TCL_ERROR; + } + toConvert.tm_min = i; + if ( Tcl_GetIntFromObj( interp, objv[6], &i ) != TCL_OK ) { + return TCL_ERROR; + } + toConvert.tm_sec = i; + toConvert.tm_isdst = -1; + toConvert.tm_wday = 0; + toConvert.tm_yday = 0; + + /* Convert the time. It is rumored that mktime is not thread + * safe on some platforms. */ + + TzsetIfNecessary(); + Tcl_MutexLock( &clockMutex ); + convertedTime = mktime( &toConvert ); + Tcl_MutexUnlock( &clockMutex ); + + /* Return the converted time, or an error if conversion fails */ + + if ( convertedTime == -1 ) { + Tcl_SetObjResult + ( interp, + Tcl_NewStringObj( "time value too large/small to represent", + -1 ) ); + return TCL_ERROR; + } else { + Tcl_SetObjResult( interp, + Tcl_NewWideIntObj( (Tcl_WideInt) convertedTime ) ); + return TCL_OK; + } + +#endif + } -/* - *----------------------------------------------------------------------------- + +/*---------------------------------------------------------------------- * - * FormatClock -- + * TclClockClicksObjCmd -- * - * Formats a time value based on seconds into a human readable - * string. + * Returns a high-resolution counter. * * Results: - * Standard Tcl result. + * Returns a standard Tcl result. * * Side effects: - * None. + * None. + * + * This function implements the 'clock clicks' Tcl command. Refer + * to the user documentation for details on what it does. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ -static int -FormatClock(interp, clockVal, useGMT, format) - Tcl_Interp *interp; /* Current interpreter. */ - unsigned long clockVal; /* Time in seconds. */ - int useGMT; /* Boolean */ - char *format; /* Format string */ +int +TclClockClicksObjCmd( clientData, interp, objc, objv ) + ClientData clientData; /* Client data is unused */ + Tcl_Interp* interp; /* Tcl interpreter */ + int objc; /* Parameter count */ + Tcl_Obj* CONST* objv; /* Parameter values */ { - struct tm *timeDataPtr; - Tcl_DString buffer; - int bufSize; - char *p; - int result; - time_t tclockVal; -#if !defined(HAVE_TM_ZONE) && !defined(WIN32) - int savedTimeZone = 0; /* lint. */ - char *savedTZEnv = NULL; /* lint. */ + static CONST char *clicksSwitches[] = { + "-milliseconds", "-microseconds", (char*) NULL + }; + enum ClicksSwitch { + CLICKS_MILLIS, CLICKS_MICROS, CLICKS_NATIVE + }; + int index = CLICKS_NATIVE; + Tcl_Time now; + + switch ( objc ) { + case 1: + break; + case 2: + if ( Tcl_GetIndexFromObj( interp, objv[1], clicksSwitches, + "option", 0, &index) != TCL_OK ) { + return TCL_ERROR; + } + break; + default: + Tcl_WrongNumArgs( interp, 1, objv, "?option?" ); + return TCL_ERROR; + } + + switch ( index ) { + case CLICKS_MILLIS: + Tcl_GetTime( &now ); + Tcl_SetObjResult( interp, + Tcl_NewWideIntObj( (Tcl_WideInt) now.sec * 1000 + + now.usec / 1000 ) ); + break; + case CLICKS_NATIVE: +#if 0 + /* + * The following code will be used once this is incorporated + * into Tcl. But TEA bugs prevent it for right now. :( + * So we fall through this case and return the microseconds + * instead. + */ + Tcl_SetObjResult( interp, + Tcl_NewWideIntObj( (Tcl_WideInt) TclpGetClicks() ) ); + break; #endif + case CLICKS_MICROS: + Tcl_GetTime( &now ); + Tcl_SetObjResult( interp, + Tcl_NewWideIntObj( ( (Tcl_WideInt) now.sec + * 1000000 ) + + now.usec ) ); + break; + } -#ifdef HAVE_TZSET - /* - * Some systems forgot to call tzset in localtime, make sure its done. - */ - static int calledTzset = 0; + return TCL_OK; +} + +/*---------------------------------------------------------------------- + * + * TclClockMillisecondsObjCmd - + * + * Returns a count of milliseconds since the epoch. + * + * Results: + * Returns a standard Tcl result. + * + * Side effects: + * None. + * + * This function implements the 'clock milliseconds' Tcl command. Refer + * to the user documentation for details on what it does. + * + *---------------------------------------------------------------------- + */ - Tcl_MutexLock(&clockMutex); - if (!calledTzset) { - tzset(); - calledTzset = 1; +int +TclClockMillisecondsObjCmd( clientData, interp, objc, objv ) + ClientData clientData; /* Client data is unused */ + Tcl_Interp* interp; /* Tcl interpreter */ + int objc; /* Parameter count */ + Tcl_Obj* CONST* objv; /* Parameter values */ +{ + Tcl_Time now; + if ( objc != 1 ) { + Tcl_WrongNumArgs( interp, 1, objv, "" ); + return TCL_ERROR; } - Tcl_MutexUnlock(&clockMutex); -#endif + Tcl_GetTime( &now ); + Tcl_SetObjResult( interp, + Tcl_NewWideIntObj( (Tcl_WideInt) now.sec * 1000 + + now.usec / 1000 ) ); + return TCL_OK; +} + +/*---------------------------------------------------------------------- + * + * TclClockMicrosecondsObjCmd - + * + * Returns a count of microseconds since the epoch. + * + * Results: + * Returns a standard Tcl result. + * + * Side effects: + * None. + * + * This function implements the 'clock microseconds' Tcl command. Refer + * to the user documentation for details on what it does. + * + *---------------------------------------------------------------------- + */ - /* - * If the user gave us -format "", just return now - */ - if (*format == '\0') { - return TCL_OK; +int +TclClockMicrosecondsObjCmd( clientData, interp, objc, objv ) + ClientData clientData; /* Client data is unused */ + Tcl_Interp* interp; /* Tcl interpreter */ + int objc; /* Parameter count */ + Tcl_Obj* CONST* objv; /* Parameter values */ +{ + Tcl_Time now; + if ( objc != 1 ) { + Tcl_WrongNumArgs( interp, 1, objv, "" ); + return TCL_ERROR; } + Tcl_GetTime( &now ); + Tcl_SetObjResult( interp, + Tcl_NewWideIntObj( ( (Tcl_WideInt) now.sec * 1000000 ) + + now.usec ) ); + return TCL_OK; +} + +/*---------------------------------------------------------------------- + * + * TclClockSecondsObjCmd - + * + * Returns a count of microseconds since the epoch. + * + * Results: + * Returns a standard Tcl result. + * + * Side effects: + * None. + * + * This function implements the 'clock seconds' Tcl command. Refer + * to the user documentation for details on what it does. + * + *---------------------------------------------------------------------- + */ -#if !defined(HAVE_TM_ZONE) && !defined(WIN32) - /* - * This is a kludge for systems not having the timezone string in - * struct tm. No matter what was specified, they use the local - * timezone string. Since this kludge requires fiddling with the - * TZ environment variable, it will mess up if done on multiple - * threads at once. Protect it with a the clock mutex. - */ - - Tcl_MutexLock(&clockMutex); - if (useGMT) { - CONST char *varValue; +int +TclClockSecondsObjCmd( clientData, interp, objc, objv ) + ClientData clientData; /* Client data is unused */ + Tcl_Interp* interp; /* Tcl interpreter */ + int objc; /* Parameter count */ + Tcl_Obj* CONST* objv; /* Parameter values */ +{ + Tcl_Time now; + if ( objc != 1 ) { + Tcl_WrongNumArgs( interp, 1, objv, "" ); + return TCL_ERROR; + } + Tcl_GetTime( &now ); + Tcl_SetObjResult( interp, Tcl_NewWideIntObj( (Tcl_WideInt) now.sec ) ); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * TzsetIfNecessary -- + * + * Calls the tzset() library function if the contents of the TZ + * environment variable has changed. + * + * Results: + * None. + * + * Side effects: + * Calls tzset. + * + *---------------------------------------------------------------------- + */ - varValue = Tcl_GetVar2(interp, "env", "TZ", TCL_GLOBAL_ONLY); - if (varValue != NULL) { - savedTZEnv = strcpy(ckalloc(strlen(varValue) + 1), varValue); - } else { - savedTZEnv = NULL; +static void +TzsetIfNecessary() +{ + static char* tzWas = NULL; /* Previous value of TZ, protected by + * clockMutex. */ + CONST char* tzIsNow; /* Current value of TZ */ + + Tcl_MutexLock( &clockMutex ); + tzIsNow = getenv( "TZ" ); + if ( tzIsNow != NULL + && ( tzWas == NULL || strcmp( tzIsNow, tzWas ) != 0 ) ) { + tzset(); + if ( tzWas != NULL ) { + ckfree( tzWas ); } - Tcl_SetVar2(interp, "env", "TZ", "GMT0", TCL_GLOBAL_ONLY); - savedTimeZone = timezone; - timezone = 0; - tzset(); + tzWas = ckalloc( strlen( tzIsNow ) + 1 ); + strcpy( tzWas, tzIsNow ); + } else if ( tzIsNow == NULL && tzWas != NULL ) { + tzset(); + ckfree( tzWas ); + tzWas = NULL; } -#endif + Tcl_MutexUnlock( &clockMutex ); +} + +/* + *------------------------------------------------------------------------- + * + * TclClockOldscanObjCmd -- + * + * Implements the legacy 'clock scan' Tcl command when no '-format' + * option is supplied. + * + * Results: + * Returns a standard Tcl result. + * + * This function implements the 'clock scan' Tcl command when no + * -format group is present. Refer to the user documentation to see + * what it does. + * + *------------------------------------------------------------------------- + */ - tclockVal = clockVal; - timeDataPtr = TclpGetDate(&tclockVal, useGMT); +int +TclClockOldscanObjCmd( ClientData clientData, /* unused */ + Tcl_Interp* interp, /* Tcl interpreter */ + int objc, /* Parameter count */ + Tcl_Obj *CONST * objv /* Parameter vector */ + ) +{ + int index; + Tcl_Obj *CONST *objPtr; + char *scanStr; + Tcl_Obj *baseObjPtr = NULL; + int useGMT = 0; + unsigned long baseClock; + long clockVal; + long zone; + Tcl_Obj *resultPtr; + int dummy; - /* - * Make a guess at the upper limit on the substituted string size - * based on the number of percents in the string. - */ + static CONST char *scanSwitches[] = { + "-base", "-gmt", (char *) NULL + }; - for (bufSize = 1, p = format; *p != '\0'; p++) { - if (*p == '%') { - bufSize += 40; - } else { - bufSize++; + if ((objc < 2) || (objc > 6)) { + wrongScanArgs: + Tcl_WrongNumArgs(interp, 2, objv, + "dateString ?-base clockValue? ?-gmt boolean?"); + return TCL_ERROR; + } + objPtr = objv+2; + objc -= 2; + while (objc > 1) { + if (Tcl_GetIndexFromObj(interp, objPtr[0], scanSwitches, + "switch", 0, &index) != TCL_OK) { + return TCL_ERROR; } + switch (index) { + case 0: /* -base */ + baseObjPtr = objPtr[1]; + break; + case 1: /* -gmt */ + if (Tcl_GetBooleanFromObj(interp, objPtr[1], + &useGMT) != TCL_OK) { + return TCL_ERROR; + } + break; + } + objPtr += 2; + objc -= 2; } - - Tcl_DStringInit(&buffer); - Tcl_DStringSetLength(&buffer, bufSize); - - /* If we haven't locked the clock mutex up above, lock it now. */ - -#if defined(HAVE_TM_ZONE) || defined(WIN32) - Tcl_MutexLock(&clockMutex); -#endif - result = TclpStrftime(buffer.string, (unsigned int) bufSize, format, - timeDataPtr, useGMT); -#if defined(HAVE_TM_ZONE) || defined(WIN32) - Tcl_MutexUnlock(&clockMutex); -#endif - -#if !defined(HAVE_TM_ZONE) && !defined(WIN32) + if (objc != 0) { + goto wrongScanArgs; + } + + if (baseObjPtr != NULL) { + if (Tcl_GetLongFromObj(interp, baseObjPtr, + (long*) &baseClock) != TCL_OK) { + return TCL_ERROR; + } + } else { + baseClock = TclpGetSeconds(); + } + if (useGMT) { - if (savedTZEnv != NULL) { - Tcl_SetVar2(interp, "env", "TZ", savedTZEnv, TCL_GLOBAL_ONLY); - ckfree(savedTZEnv); - } else { - Tcl_UnsetVar2(interp, "env", "TZ", TCL_GLOBAL_ONLY); - } - timezone = savedTimeZone; - tzset(); + zone = -50000; /* Force GMT */ + } else { + zone = TclpGetTimeZone((unsigned long) baseClock); } - Tcl_MutexUnlock(&clockMutex); -#endif - - if (result == 0) { - /* - * A zero return is the error case (can also mean the strftime - * didn't get enough space to write into). We know it doesn't - * mean that we wrote zero chars because the check for an empty - * format string is above. - */ - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "bad format string \"", format, "\"", (char *) NULL); + + scanStr = Tcl_GetStringFromObj(objv[1], &dummy); + Tcl_MutexLock(&clockMutex); + if (TclGetDate(scanStr, (unsigned long) baseClock, zone, + &clockVal) < 0) { + Tcl_MutexUnlock(&clockMutex); + resultPtr = Tcl_NewObj(); + Tcl_AppendStringsToObj(resultPtr, + "unable to convert date-time string \"", + scanStr, "\"", (char *) NULL); + Tcl_SetObjResult( interp, resultPtr ); return TCL_ERROR; } - - Tcl_SetStringObj(Tcl_GetObjResult(interp), buffer.string, -1); - - Tcl_DStringFree(&buffer); + Tcl_MutexUnlock(&clockMutex); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj( (Tcl_WideInt) clockVal ) ); return TCL_OK; + } diff --git a/generic/tclInt.h b/generic/tclInt.h index 620af26..8633e6e 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.171 2004/08/02 20:55:37 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.172 2004/08/18 19:58:59 kennykb Exp $ */ #ifndef _TCLINT @@ -1958,7 +1958,19 @@ EXTERN int Tcl_CatchObjCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); EXTERN int Tcl_CdObjCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); -EXTERN int Tcl_ClockObjCmd _ANSI_ARGS_((ClientData clientData, +EXTERN int TclClockClicksObjCmd _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); +EXTERN int TclClockMicrosecondsObjCmd _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); +EXTERN int TclClockMillisecondsObjCmd _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); +EXTERN int TclClockSecondsObjCmd _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); +EXTERN int TclClockLocaltimeObjCmd _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); +EXTERN int TclClockMktimeObjCmd _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); +EXTERN int TclClockOldscanObjCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); EXTERN int Tcl_CloseObjCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 12a2a8b..70c3356 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.43 2004/08/02 20:55:37 dgp Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.44 2004/08/18 19:59:00 kennykb Exp $ */ #include "tclInt.h" @@ -2003,6 +2003,8 @@ SlaveCreate(interp, pathPtr, safe) char *path; int new, objc; Tcl_Obj **objv; + Tcl_Obj* clockObj; + int status; if (Tcl_ListObjGetElements(interp, pathPtr, &objc, &objv) != TCL_OK) { return NULL; @@ -2071,10 +2073,23 @@ SlaveCreate(interp, pathPtr, safe) */ InheritLimitsFromMaster(slaveInterp, masterInterp); + if ( safe ) { + clockObj = Tcl_NewStringObj( "clock", -1 ); + Tcl_IncrRefCount( clockObj ); + status = AliasCreate( interp, slaveInterp, masterInterp, + clockObj, clockObj, 0, (Tcl_Obj *CONST *) NULL ); + Tcl_DecrRefCount( clockObj ); + if ( status != TCL_OK ) { + goto error2; + } + } + + return slaveInterp; - error: + error: TclTransferResult(slaveInterp, TCL_ERROR, interp); + error2: Tcl_DeleteInterp(slaveInterp); return NULL; diff --git a/library/clock.tcl b/library/clock.tcl new file mode 100644 index 0000000..44e7d8c --- /dev/null +++ b/library/clock.tcl @@ -0,0 +1,4874 @@ +#---------------------------------------------------------------------- +# +# clock.tcl -- +# +# This file implements the portions of the [clock] ensemble that +# are coded in Tcl. Refer to the users' manual to see the description +# of the [clock] command and its subcommands. +# +# +#---------------------------------------------------------------------- +# +# Copyright (c) 2004 by Kevin B. Kenny. All rights reserved. +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: clock.tcl,v 1.1 2004/08/18 19:59:00 kennykb Exp $ +# +#---------------------------------------------------------------------- + +# We must have message catalogs that support the root locale, and +# we need access to the Registry on Windows systems. We also need +# Tcl 8.5 dictionaries. + +uplevel \#0 { + package require msgcat 1.4 + if { $::tcl_platform(platform) eq {windows} } { + package require registry 1.1 + } +} + +# Put the library directory into the namespace for the ensemble +# so that the library code can find message catalogs and time zone +# definition files. + +namespace eval ::tcl::clock \ + [list variable LibDir [file dirname [info script]]] + +#---------------------------------------------------------------------- +# +# clock -- +# +# Manipulate times. +# +# The 'clock' command manipulates time. Refer to the user documentation +# for the available subcommands and what they do. +# +#---------------------------------------------------------------------- + +namespace eval ::tcl::clock { + + # Export the subcommands + + namespace export format + namespace export clicks + namespace export microseconds + namespace export milliseconds + namespace export scan + namespace export seconds + namespace export add + + # Import the message catalog commands that we use. + + namespace import ::msgcat::mc + namespace import ::msgcat::mcload + namespace import ::msgcat::mclocale + + # Define the Greenwich time zone + + variable TZData + set TZData(:Etc/GMT) { + {-9223372036854775808 0 0 GMT} + } + set TZData(:GMT) $TZData(:Etc/GMT) + set TZData(:Etc/UTC) { + {-9223372036854775808 0 0 UTC} + } + set TZData(:UTC) $TZData(:Etc/UTC) + + # Define the message catalog for the root locale. + + ::msgcat::mcmset {} { + AM {am} + BCE {B.C.E.} + CE {C.E.} + DATE_FORMAT {%m/%d/%Y} + DATE_TIME_FORMAT {%a %b %e %H:%M:%S %Y} + DAYS_OF_WEEK_ABBREV { + Sun Mon Tue Wed Thu Fri Sat + } + DAYS_OF_WEEK_FULL { + Sunday Monday Tuesday Wednesday Thursday Friday Saturday + } + GREGORIAN_CHANGE_DATE 2299161 + LOCALE_DATE_FORMAT {%m/%d/%Y} + LOCALE_DATE_TIME_FORMAT {%a %b %e %H:%M:%S %Y} + LOCALE_ERAS {} + LOCALE_NUMERALS { + 00 01 02 03 04 05 06 07 08 09 + 10 11 12 13 14 15 16 17 18 19 + 20 21 22 23 24 25 26 27 28 29 + 30 31 32 33 34 35 36 37 38 39 + 40 41 42 43 44 45 46 47 48 49 + 50 51 52 53 54 55 56 57 58 59 + 60 61 62 63 64 65 66 67 68 69 + 70 71 72 73 74 75 76 77 78 79 + 80 81 82 83 84 85 86 87 88 89 + 90 91 92 93 94 95 96 97 98 99 + } + LOCALE_TIME_FORMAT {%H:%M:%S} + LOCALE_YEAR_FORMAT {%EC%Ey} + MONTHS_ABBREV { + Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec + } + MONTHS_FULL { + January February March + April May June + July August September + October November December + } + PM {pm} + TIME_FORMAT {%H:%M:%S} + TIME_FORMAT_12 {%I:%M:%S %P} + TIME_FORMAT_24 {%H:%M} + TIME_FORMAT_24_SECS {%H:%M:%S} + } + + # Define a few Gregorian change dates for other locales. In most cases + # the change date follows a language, because a nation's colonies changed + # at the same time as the nation itself. In many cases, different + # national boundaries existed; the dominating rule is to follow the + # nation's capital. + + # Italy, Spain, Portugal, Poland + + ::msgcat::mcset it GREGORIAN_CHANGE_DATE 2299161 + ::msgcat::mcset es GREGORIAN_CHANGE_DATE 2299161 + ::msgcat::mcset pt GREGORIAN_CHANGE_DATE 2299161 + ::msgcat::mcset pl GREGORIAN_CHANGE_DATE 2299161 + + # France, Austria + + ::msgcat::mcset fr GREGORIAN_CHANGE_DATE 2299227 + + # For Belgium, we follow Southern Netherlands; Liege Diocese + # changed several weeks later. + + ::msgcat::mcset fr_BE GREGORIAN_CHANGE_DATE 2299238 + ::msgcat::mcset nl_BE GREGORIAN_CHANGE_DATE 2299238 + + # Austria + + ::msgcat::mcset de_AT GREGORIAN_CHANGE_DATE 2299527 + + # Hungary + + ::msgcat::mcset hu GREGORIAN_CHANGE_DATE 2301004 + + # Germany, Norway, Denmark (Catholic Germany changed earlier) + + ::msgcat::mcset de_DE GREGORIAN_CHANGE_DATE 2342032 + ::msgcat::mcset nb GREGORIAN_CHANGE_DATE 2342032 + ::msgcat::mcset nn GREGORIAN_CHANGE_DATE 2342032 + ::msgcat::mcset no GREGORIAN_CHANGE_DATE 2342032 + ::msgcat::mcset da GREGORIAN_CHANGE_DATE 2342032 + + # Holland (Brabant, Gelderland, Flanders, Friesland, etc. changed + # at various times) + + ::msgcat::mcset nl GREGORIAN_CHANGE_DATE 2342165 + + # Protestant Switzerland (Catholic cantons changed earlier) + + ::msgcat::mcset fr_CH GREGORIAN_CHANGE_DATE 2361342 + ::msgcat::mcset it_CH GREGORIAN_CHANGE_DATE 2361342 + ::msgcat::mcset de_CH GREGORIAN_CHANGE_DATE 2361342 + + # English speaking countries + + ::msgcat::mcset en GREGORIAN_CHANGE_DATE 2361222 + + # Sweden (had several changes onto and off of the Gregorian calendar) + + ::msgcat::mcset sv GREGORIAN_CHANGE_DATE 2361390 + + # Russia + + ::msgcat::mcset ru GREGORIAN_CHANGE_DATE 2421639 + + # Romania (Transylvania changed earler - perhaps de_RO should show + # the earlier date?) + + ::msgcat::mcset ro GREGORIAN_CHANGE_DATE 2422063 + + # Greece + + ::msgcat::mcset el GREGORIAN_CHANGE_DATE 2423480 + + #------------------------------------------------------------------ + # + # CONSTANTS + # + #------------------------------------------------------------------ + + # Paths at which binary time zone data for the Olson libraries + # are known to reside on various operating systems + + variable ZoneinfoPaths {} + proc ZoneinfoInit {} { + variable ZoneinfoPaths + rename ZoneinfoInit {} + foreach path { + /usr/share/zoneinfo + /usr/share/lib/zoneinfo + /usr/local/etc/zoneinfo + C:/Progra~1/cygwin/usr/local/etc/zoneinfo + } { + if { [file isdirectory $path] } { + lappend ZoneinfoPaths $path + } + } + } + ZoneinfoInit + + # Define the directories for time zone data and message catalogs. + + variable DataDir [file join $LibDir tzdata] + variable MsgDir [file join $LibDir msgs] + + # Number of days in the months, in common years and leap years. + + variable DaysInRomanMonthInCommonYear \ + { 31 28 31 30 31 30 31 31 30 31 30 31 } + variable DaysInRomanMonthInLeapYear \ + { 31 29 31 30 31 30 31 31 30 31 30 31 } + variable DaysInPriorMonthsInCommonYear [list 0] + variable DaysInPriorMonthsInLeapYear [list 0] + set i 0 + foreach j $DaysInRomanMonthInCommonYear { + lappend DaysInPriorMonthsInCommonYear [incr i $j] + } + set i 0 + foreach j $DaysInRomanMonthInLeapYear { + lappend DaysInPriorMonthsInLeapYear [incr i $j] + } + unset i j + + # Julian day number of 0 January, 1 CE, in the proleptic Julian and + # Gregorian calendars. + + variable JD0Jan1CEJul 1721423 + variable JD0Jan1CEGreg 1721425 + variable JD31Dec9999 5373484 + + # Posix epoch, expressed as seconds from the Julian epoch + + variable PosixEpochAsJulianSeconds 210866803200 + + # Another epoch (Hi, Jeff!) + + variable Roddenberry 1946 + + # Integer ranges + + variable MINWIDE -9223372036854775808 + variable MAXWIDE 9223372036854775807 + + # Day before Leap Day + + variable FEB_28 58 + + # Conversion factors + + variable DaysPer400Yr 146097; # Days per 400 year Gregorian cycle + variable DaysPerCentury 36524; # Days per common Gregorian century + variable DaysPer4Yr 1461; # Days per 4 year cycle + variable DaysPerYear 365; # Days per common year + variable DaysPerWeek 7; + variable SecondsPerDay 86400; # Seconds per day + variable SecondsPerHour 3600; # Seconds per hour + variable SecondsPerMinute 60; # Seconds per minute + variable MinutesPerHour 60; # Minutes per hour + variable HoursPerDay 24; # Hours per day + + # Translation table to map Windows TZI onto cities, so that + # the Olson rules can apply. In some cases the mapping is ambiguous, + # so it's wise to specify $::env(TCL_TZ) rather than simply depending + # on the system time zone. + + # The keys are long lists of values obtained from the time zone + # information in the Registry. In order, the list elements are: + # Bias StandardBias DaylightBias + # StandardDate.wYear StandardDate.wMonth StandardDate.wDayOfWeek + # StandardDate.wDay StandardDate.wHour StandardDate.wMinute + # StandardDate.wSecond StandardDate.wMilliseconds + # DaylightDate.wYear DaylightDate.wMonth DaylightDate.wDayOfWeek + # DaylightDate.wDay DaylightDate.wHour DaylightDate.wMinute + # DaylightDate.wSecond DaylightDate.wMilliseconds + # The values are the names of time zones where those rules apply. + # There is considerable ambiguity in certain zones; an attempt has + # been made to make a reasonable guess, but this table needs to be + # taken with a grain of salt. + + variable WinZoneInfo [dict create \ + {-43200 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Pacific/Kwajalein \ + {-39600 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Pacific/Midway \ + {-36000 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Pacific/Honolulu \ + {-32400 0 3600 0 10 0 5 2 0 0 0 0 4 0 1 2 0 0 0} :America/Anchorage \ + {-28800 0 3600 0 10 0 5 2 0 0 0 0 4 0 1 2 0 0 0} :America/Los_Angeles \ + {-25200 0 3600 0 10 0 5 2 0 0 0 0 4 0 1 2 0 0 0} :America/Denver \ + {-25200 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :America/Phoenix \ + {-21600 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :America/Regina \ + {-21600 0 3600 0 10 0 5 2 0 0 0 0 4 0 1 2 0 0 0} :America/Chicago \ + {-18000 0 3600 0 10 0 5 2 0 0 0 0 4 0 1 2 0 0 0} :America/New_York \ + {-18000 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :America/Indianapolis \ + {-14400 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :America/Caracas \ + {-14400 0 3600 0 3 6 2 0 0 0 0 0 10 6 2 0 0 0 0} :America/Santiago \ + {-14400 0 3600 0 10 0 5 2 0 0 0 0 4 0 1 2 0 0 0} :America/Halifax \ + {-12600 0 3600 0 10 0 5 2 0 0 0 0 4 0 1 2 0 0 0} :America/St_Johns \ + {-10800 0 3600 0 2 0 2 2 0 0 0 0 10 0 3 2 0 0 0} :America/Sao_Paulo \ + {-10800 0 3600 0 10 0 5 2 0 0 0 0 4 0 1 2 0 0 0} :America/Godthab \ + {-10800 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :America/Buenos_Aires \ + {-7200 0 3600 0 9 0 5 2 0 0 0 0 3 0 5 2 0 0 0} :America/Noronha \ + {-3600 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :Atlantic/Azores \ + {-3600 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Atlantic/Cape_Verde \ + {0 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :UTC \ + {0 0 3600 0 10 0 5 2 0 0 0 0 3 0 5 1 0 0 0} :Europe/London \ + {3600 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Africa/Kinshasa \ + {3600 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :CET \ + {7200 0 3600 0 9 3 5 2 0 0 0 0 5 5 1 2 0 0 0} :Africa/Cairo \ + {7200 0 3600 0 10 0 5 4 0 0 0 0 3 0 5 3 0 0 0} :Europe/Helsinki \ + {7200 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Asia/Jerusalem \ + {7200 0 3600 0 9 0 5 1 0 0 0 0 3 0 5 0 0 0 0} :Europe/Bucharest \ + {7200 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :Europe/Athens \ + {10800 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Asia/Riyadh \ + {10800 0 3600 0 10 0 1 4 0 0 0 0 4 0 1 3 0 0 0} :Asia/Baghdad \ + {10800 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :Europe/Moscow \ + {12600 0 3600 0 9 2 4 2 0 0 0 0 3 0 1 2 0 0 0} :Asia/Tehran \ + {14400 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Asia/Muscat \ + {14400 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :Asia/Tbilisi \ + {16200 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Asia/Kabul \ + {18000 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Asia/Karachi \ + {18000 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :Asia/Yekaterinburg \ + {19800 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Asia/Calcutta \ + {20700 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Asia/Katmandu \ + {21600 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Asia/Dhaka \ + {21600 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :Asia/Novosibirsk \ + {23400 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Asia/Rangoon \ + {25200 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Asia/Bangkok \ + {25200 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :Asia/Krasnoyarsk \ + {28800 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Asia/Chongqing \ + {28800 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :Asia/Irkutsk \ + {32400 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Asia/Tokyo \ + {32400 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :Asia/Yakutsk \ + {34200 0 3600 0 3 0 5 3 0 0 0 0 10 0 5 2 0 0 0} :Australia/Adelaide \ + {34200 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Australia/Darwin \ + {36000 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Australia/Brisbane \ + {36000 0 3600 0 10 0 5 3 0 0 0 0 3 0 5 2 0 0 0} :Asia/Vladivostok \ + {36000 0 3600 0 3 0 5 3 0 0 0 0 10 0 1 2 0 0 0} :Australia/Hobart \ + {36000 0 3600 0 3 0 5 3 0 0 0 0 10 0 5 2 0 0 0} :Australia/Sydney \ + {39600 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Pacific/Noumea \ + {43200 0 3600 0 3 0 3 2 0 0 0 0 10 0 1 2 0 0 0} :Pacific/Auckland \ + {43200 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Pacific/Fiji \ + {46800 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Pacific/Tongatapu] + + # Groups of fields that specify the date, priorities, and + # code bursts that determine Julian Day Number given those groups. + # The code in [clock scan] will choose the highest priority + # (lowest numbered) set of fields that determines the date. + + variable DateParseActions { + + { seconds } 0 {} + + { julianDay } 1 {} + + { century yearOfCentury month dayOfMonth } 2 { + dict set date era CE + dict set date year [expr { 100 * [dict get $date century] + + [dict get $date yearOfCentury] }] + set date [GetJulianDayFromEraYearMonthDay [K $date [set date {}]]] + } + { century yearOfCentury dayOfYear } 2 { + dict set date era CE + dict set date year [expr { 100 * [dict get $date century] + + [dict get $date yearOfCentury] }] + set date [GetJulianDayFromEraYearDay [K $date [set date {}]]] + } + { iso8601Century iso8601YearOfCentury iso8601Week dayOfWeek } 2 { + dict set date era CE + dict set date iso8601Year \ + [expr { 100 * [dict get $date iso8601Century] + + [dict get $date iso8601YearOfCentury] }] + set date [GetJulianDayFromEraYearWeekDay [K $date [set date {}]]] + } + + { yearOfCentury month dayOfMonth } 3 { + set date [InterpretTwoDigitYear [K $date [set date {}]] $baseTime] + dict set date era CE + set date [GetJulianDayFromEraYearMonthDay [K $date [set date {}]]] + } + { yearOfCentury dayOfYear } 3 { + set date [InterpretTwoDigitYear [K $date [set date {}]] $baseTime] + dict set date era CE + set date [GetJulianDayFromEraYearDay [K $date [set date {}]]] + } + { iso8601YearOfCentury iso8601Week dayOfWeek } 3 { + set date [InterpretTwoDigitYear \ + [K $date [set date {}]] $baseTime \ + iso8601YearOfCentury iso8601Year] + dict set date era CE + set date [GetJulianDayFromEraYearWeekDay [K $date [set date {}]]] + } + + { month dayOfMonth } 4 { + set date [AssignBaseYear [K $date [set date {}]] \ + $baseTime $timeZone] + set date [GetJulianDayFromEraYearMonthDay [K $date [set date {}]]] + } + { dayOfYear } 4 { + set date [AssignBaseYear [K $date [set date {}]] \ + $baseTime $timeZone] + set date [GetJulianDayFromEraYearDay [K $date [set date {}]]] + } + { iso8601Week dayOfWeek } 4 { + set date [AssignBaseIso8601Year [K $date [set date {}]] \ + $baseTime $timeZone] + set date [GetJulianDayFromEraYearWeekDay [K $date [set date {}]]] + } + + { dayOfMonth } 5 { + set date [AssignBaseMonth [K $date [set date {}]] \ + $baseTime $timeZone] + set date [GetJulianDayFromEraYearMonthDay [K $date [set date {}]]] + } + + { dayOfWeek } 6 { + set date [AssignBaseWeek [K $date [set date {}]] \ + $baseTime $timeZone] + set date [GetJulianDayFromEraYearWeekDay [K $date [set date {}]]] + } + + {} 7 { + set date [AssignBaseJulianDay [K $date [set date {}]] \ + $baseTime $timeZone] + } + } + + # Groups of fields that specify time of day, priorities, + # and code that processes them + + variable TimeParseActions { + + seconds 1 {} + + { hourAMPM minute second amPmIndicator } 2 { + dict set date secondOfDay [InterpretHMSP $date] + } + { hour minute second } 2 { + dict set date secondOfDay [InterpretHMS $date] + } + + { hourAMPM minute amPmIndicator } 3 { + dict set date second 0 + dict set date secondOfDay [InterpretHMSP $date] + } + { hour minute } 3 { + dict set date second 0 + dict set date secondOfDay [InterpretHMS $date] + } + + { hourAMPM amPmIndicator } 4 { + dict set date minute 0 + dict set date second 0 + dict set date secondOfDay [InterpretHMSP $date] + } + { hour } 4 { + dict set date minute 0 + dict set date second 0 + dict set date secondOfDay [InterpretHMS $date] + } + + { } 5 { + dict set date secondOfDay 0 + } + } + + # Legacy time zones, used primarily for parsing RFC822 dates. + + variable LegacyTimeZone [dict create \ + gmt +0000 \ + ut +0000 \ + utc +0000 \ + bst +0100 \ + wet +0000 \ + wat -0100 \ + at -0200 \ + nft -0330 \ + nst -0330 \ + ndt -0230 \ + ast -0400 \ + adt -0300 \ + est -0500 \ + edt -0400 \ + cst -0600 \ + cdt -0500 \ + mst -0700 \ + mdt -0600 \ + pst -0800 \ + pdt -0700 \ + yst -0900 \ + ydt -0800 \ + hst -1000 \ + hdt -0900 \ + cat -1000 \ + ahst -1000 \ + nt -1100 \ + idlw -1200 \ + cet +0100 \ + cest +0200 \ + met +0100 \ + mewt +0100 \ + mest +0200 \ + swt +0100 \ + sst +0200 \ + fwt +0100 \ + fst +0200 \ + eet +0200 \ + eest +0300 \ + bt +0300 \ + it +0330 \ + zp4 +0400 \ + zp5 +0500 \ + ist +0530 \ + zp6 +0600 \ + wast +0700 \ + wadt +0800 \ + jt +0730 \ + cct +0800 \ + jst +0900 \ + cast +0930 \ + cadt +1030 \ + east +1000 \ + eadt +1030 \ + gst +1000 \ + nzt +1200 \ + nzst +1200 \ + nzdt +1300 \ + idle +1200 \ + a +0100 \ + b +0200 \ + c +0300 \ + d +0400 \ + e +0500 \ + f +0600 \ + g +0700 \ + h +0800 \ + i +0900 \ + k +1000 \ + l +1100 \ + m +1200 \ + n -0100 \ + o -0200 \ + p -0300 \ + q -0400 \ + r -0500 \ + s -0600 \ + t -0700 \ + u -0800 \ + v -0900 \ + w -1000 \ + x -1100 \ + y -1200 \ + z +0000 \ + ] + + # Caches + + variable LocaleNumeralCache {}; # Dictionary whose keys are locale + # names and whose values are pairs + # comprising regexes matching numerals + # in the given locales and dictionaries + # mapping the numerals to their numeric + # values. + variable McLoaded {}; # Dictionary whose keys are locales + # in which [mcload] has been executed + # and whose values are immaterial + # variable CachedSystemTimeZone; # If 'CachedSystemTimeZone' exists, + # it contains the value of the + # system time zone, as determined from + # the environment. + variable TZData; # Array whose keys are time zone names + # and whose values are lists of quads + # comprising start time, UTC offset, + # Daylight Saving Time indicator, and + # time zone abbreviation. +} + +#---------------------------------------------------------------------- +# +# K -- +# +# The K combinator returns its first argument. It's used for +# reference count management. +# +# Parameters: +# x - Argument to be unreferenced. +# y - Unused. +# +# Results: +# Returns the first argument. +# +# Side effects: +# None. +# +# The K combinator is used for its effect that [K $x [set x {}]] +# reads out the value of x destructively, giving an unshared Tcl +# object and avoiding 'copy on write' +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::K { x y } { return $x } + +#---------------------------------------------------------------------- +# +# clock format -- +# +# Formats a count of seconds since the Posix Epoch as a time +# of day. +# +# The 'clock format' command formats times of day for output. +# Refer to the user documentation to see what it does. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::format { args } { + + variable SecondsPerDay + variable SecondsPerHour + variable SecondsPerMinute + variable MinutesPerHour + variable HoursPerDay + variable DaysPerYear + variable DaysPerWeek + + set format {} + + # Check the count of args + + if { [llength $args] < 1 || [llength $args] % 2 != 1 } { + return -code error \ + -errorcode [list CLOCK wrongNumArgs] \ + "wrong \# args: should be\ + \"[lindex [info level 0] 0] clockval\ + ?-format string? ?-gmt boolean?\ + ?-locale LOCALE? ?-timezone ZONE?\"" + } + + # Set defaults + + set clockval [lindex $args 0] + set format {%a %b %d %H:%M:%S %Z %Y} + set gmt 0 + set locale C + set timezone [GetSystemTimeZone] + + # Pick up command line options. + + foreach { flag value } [lreplace $args 0 0] { + set saw($flag) {} + switch -exact -- $flag { + -format { + set format $value + } + -gmt { + set gmt $value + } + -locale { + set locale $value + } + -timezone { + set timezone $value + } + default { + return -code error \ + -errorcode [list CLOCK badSwitch $flag] \ + "bad switch \"$flag\",\ + must be -format, -gmt, -locale or -timezone" + } + } + } + + # Check options for validity + + if { [info exists saw(-gmt)] && [info exists saw(-timezone)] } { + return -code error \ + -errorcode [list CLOCK gmtWithTimezone] \ + "cannot use -gmt and -timezone in same call" + } + if { [catch { expr { wide($clockval) } } result] } { + return -code error \ + "expected integer but got \"$clockval\"" + } + if { ![string is boolean $gmt] } { + return -code error \ + "expected boolean value but got \"$gmt\"" + } else { + if { $gmt } { + set timezone :GMT + } + } + + EnterLocale $locale oldLocale + + # Change locale if a fresh locale has been given on the command line. + + set status [catch { + + # Map away the locale-dependent composite format groups + + set format [LocalizeFormat $format] + + # Convert the given time to local time. + + set date [dict create seconds $clockval] + set date [ConvertUTCToLocal [K $date [set date {}]] $timezone] + + # Extract the fields of the date. + + set date [GetJulianDay [K $date [set date {}]]] + set date [GetGregorianEraYearDay [K $date [set date {}]]] + set date [GetMonthDay [K $date [set date {}]]] + set date [GetYearWeekDay [K $date [set date {}]]] + + # Format the result + + set state {} + set retval {} + foreach char [split $format {}] { + switch -exact $state { + {} { + if { [string equal % $char] } { + set state percent + } else { + append retval $char + } + } + percent { # Character following a '%' character + set state {} + switch -exact -- $char { + % { # A literal character, '%' + append retval % + } + a { # Day of week, abbreviated + set dow [expr { [dict get $date dayOfWeek] % 7 }] + append retval \ + [lindex [mc DAYS_OF_WEEK_ABBREV] $dow] + } + A { # Day of week, spelt out. + set dow [expr { [dict get $date dayOfWeek] % 7 }] + append retval [lindex [mc DAYS_OF_WEEK_FULL] $dow] + } + b - h { # Name of month, abbreviated. + set month [expr { [dict get $date month] - 1 }] + append retval [lindex [mc MONTHS_ABBREV] $month] + } + B { # Name of month, spelt out + set month [expr { [dict get $date month] - 1 }] + append retval [lindex [mc MONTHS_FULL] $month] + } + C { # Century number + set cent [expr { [dict get $date year] / 100 }] + append retval [::format %02d $cent] + } + d { # Day of month, with leading zero + append retval [::format %02d \ + [dict get $date dayOfMonth]] + } + e { # Day of month, without leading zero + append retval [::format %2d \ + [dict get $date dayOfMonth]] + } + E { # Format group in a locale-dependent + # alternative era + set state percentE + if { ![dict exists $date localeEra] } { + set date [GetLocaleEra [K $date [set date {}]]] + } + } + g { # Two-digit year relative to ISO8601 + # week number + set year \ + [expr { [dict get $date iso8601Year] % 100 }] + append retval [::format %02d $year] + } + G { # Four-digit year relative to ISO8601 + # week number + append retval [::format %04d \ + [dict get $date iso8601Year]] + } + H { # Hour in the 24-hour day, leading zero + append retval \ + [::format %02d \ + [expr { [dict get $date localSeconds] + / $SecondsPerHour + % $HoursPerDay }]] + } + I { # Hour AM/PM, with leading zero + set hour12 \ + [expr { ( ( ( [dict get $date localSeconds] + % $SecondsPerDay ) + + $SecondsPerDay + - $SecondsPerHour ) + / $SecondsPerHour ) + % 12 + 1 }] + append retval [::format %02d $hour12] + } + j { # Day of year (001-366) + append retval [::format %03d \ + [dict get $date dayOfYear]] + } + J { # Julian Day Number + append retval [::format %07ld \ + [dict get $date julianDay]] + } + k { # Hour (0-23), no leading zero + append retval \ + [::format %2d \ + [expr { [dict get $date localSeconds] + / $SecondsPerHour + % $HoursPerDay }]] + } + l { # Hour (12-11), no leading zero + set hour12 \ + [expr { ( ( ( [dict get $date localSeconds] + % $SecondsPerDay ) + + $SecondsPerDay + - $SecondsPerHour ) + / $SecondsPerHour ) + % 12 + 1 }] + append retval [::format %2d $hour12] + } + m { # Month number, leading zero + append retval [::format %02d \ + [dict get $date month]] + } + M { # Minute of the hour, leading zero + append retval \ + [::format %02d \ + [expr { [dict get $date localSeconds] + / $SecondsPerMinute + % $MinutesPerHour }]] + } + n { # A literal newline + append retval \n + } + N { # Month number, no leading zero + append retval [::format %2d \ + [dict get $date month]] + } + O { # A format group in the locale's + # alternative numerals + set state percentO + } + p { # Localized 'AM' or 'PM' indicator + # converted to uppercase + set tod [expr { [dict get $date localSeconds] + % $SecondsPerDay }] + if { $tod >= ( $SecondsPerDay / 2 ) } { + append retval [string toupper [mc PM]] + } else { + append retval [string toupper [mc AM]] + } + } + P { # Localized 'AM' or 'PM' indicator + set tod [expr { [dict get $date localSeconds] + % $SecondsPerDay }] + if { $tod >= ( $SecondsPerDay / 2 ) } { + append retval [mc PM] + } else { + append retval [mc AM] + } + } + Q { # Hi, Jeff! + append retval [FormatStarDate $date] + } + s { # Seconds from the Posix Epoch + append retval $clockval + } + S { # Second of the minute, with + # leading zero + append retval \ + [::format %02d \ + [expr { [dict get $date localSeconds] + % $SecondsPerMinute }]] + } + t { # A literal tab character + append retval \t + } + u { # Day of the week (1-Monday, 7-Sunday) + append retval [dict get $date dayOfWeek] + } + U { # Week of the year (00-53). The + # first Sunday of the year is the + # first day of week 01 + set dow [dict get $date dayOfWeek] + if { $dow == 7 } { + set dow 0 + } + incr dow + set weekNumber \ + [expr { ( [dict get $date dayOfYear] + - $dow + + $DaysPerWeek ) + / $DaysPerWeek }] + append retval [::format %02d $weekNumber] + } + V { # The ISO8601 week number + append retval [::format %02d \ + [dict get $date iso8601Week]] + } + w { # Day of the week (0-Sunday, + # 6-Saturday) + append retval \ + [expr { [dict get $date dayOfWeek] % 7 }] + } + W { # Week of the year (00-53). The first + # Monday of the year is the first day + # of week 01. + set weekNumber \ + [expr { ( [dict get $date dayOfYear] + - [dict get $date dayOfWeek] + + $DaysPerWeek ) + / $DaysPerWeek }] + append retval [::format %02d $weekNumber] + } + y { # The two-digit year of the century + append retval \ + [::format %02d \ + [expr { [dict get $date year] % 100 }]] + } + Y { # The four-digit year + append retval [::format %04d \ + [dict get $date year]] + } + z { # The time zone as hours and minutes + # east (+) or west (-) of Greenwich + set z [dict get $date tzOffset] + if { $z < 0 } { + set z [expr { - $z }] + append retval - + } else { + append retval + + } + append retval [::format %02d \ + [expr { $z / $SecondsPerHour }]] + set z [expr { $z % $SecondsPerHour }] + append retval \ + [::format %02d \ + [expr { $z / $SecondsPerMinute }]] + set z [expr { $z % $SecondsPerMinute }] + if { $z != 0 } { + append retval [::format %02d $z] + } + } + Z { # The name of the time zone + append retval [dict get $date tzName] + } + % { # A literal percent character + append retval % + } + default { # An unknown escape sequence + append retval % $char + } + } + } + percentE { # Character following %E + set state {} + switch -exact -- $char { + C { # Locale-dependent era + append retval [dict get $date localeEra] + } + y { # Locale-dependent year of the era + set y [dict get $date localeYear] + if { $y >= 0 && $y < 100 } { + append retval [lindex [mc LOCALE_NUMERALS] $y] + } else { + append retval $y + } + } + default { # Unknown format group + append retval %E $char + } + } + } + percentO { # Character following %O + set state {} + switch -exact -- $char { + d - e { # Day of the month in alternative + # numerals + append retval [lindex \ + [mc LOCALE_NUMERALS] \ + [dict get $date dayOfMonth]] + } + H - k { # Hour of the day in alternative + # numerals + set hour [expr { [dict get $date localSeconds] + / $SecondsPerHour + % $HoursPerDay }] + append retval [lindex [mc LOCALE_NUMERALS] $hour] + } + I - l { # Hour (12-11) AM/PM in alternative + # numerals + set hour12 \ + [expr { ( ( ( [dict get $date localSeconds] + % $SecondsPerDay ) + + $SecondsPerDay + - $SecondsPerHour ) + / $SecondsPerHour ) + % 12 + 1 }] + append retval [lindex [mc LOCALE_NUMERALS] $hour12] + } + m { # Month number in alternative numerals + append retval [lindex \ + [mc LOCALE_NUMERALS] \ + [dict get $date month]] + } + M { # Minute of the hour in alternative + # numerals + set minute [expr { [dict get $date localSeconds] + / $SecondsPerMinute + % $MinutesPerHour }] + append retval [lindex [mc LOCALE_NUMERALS] $minute] + } + S { # Second of the minute in alternative + # numerals + set second [expr { [dict get $date localSeconds] + % $SecondsPerMinute }] + append retval [lindex [mc LOCALE_NUMERALS] $second] + } + u { # Day of the week (Monday=1,Sunday=7) + # in alternative numerals + append retval [lindex \ + [mc LOCALE_NUMERALS] \ + [dict get $date dayOfWeek]] + } + w { # Day of the week (Sunday=0,Saturday=6) + # in alternative numerals + append retval \ + [lindex \ + [mc LOCALE_NUMERALS] \ + [expr { [dict get $date dayOfWeek] % 7 }]] + } + y { # Year of the century in alternative + # numerals + append retval \ + [lindex \ + [mc LOCALE_NUMERALS] \ + [expr { [dict get $date year] % 100 }]] + } + default { # Unknown format group + append retval %O $char + } + } + } + } + } + + # Clean up any improperly terminated groups + + switch -exact -- $state { + percent { + append retval % + } + percentE { + append retval %E + } + percentO { + append retval %O + } + } + + set retval + + } result] + + # Restore the locale + + if { [info exists oldLocale] } { + mclocale $oldLocale + } + + if { $status == 1 } { + if { [lindex $::errorCode 0] eq {clock} } { + return -code error $result + } else { + return -code error \ + -errorcode $::errorCode -errorinfo $::errorInfo \ + $result + } + } else { + return $result + } + +} + +#---------------------------------------------------------------------- +# +# clock scan -- +# +# Inputs a count of seconds since the Posix Epoch as a time +# of day. +# +# The 'clock format' command scans times of day on input. +# Refer to the user documentation to see what it does. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::scan { args } { + + set format {} + + # Check the count of args + + if { [llength $args] < 1 || [llength $args] % 2 != 1 } { + return -code error \ + -errorcode [list CLOCK wrongNumArgs] \ + "wrong \# args: should be\ + \"[lindex [info level 0] 0] string\ + ?-base seconds?\ + ?-format string? ?-gmt boolean?\ + ?-locale LOCALE? ?-timezone ZONE?\"" + } + + # Set defaults + + set base [clock seconds] + set string [lindex $args 0] + set format {} + set gmt 0 + set locale C + set timezone [GetSystemTimeZone] + + # Pick up command line options. + + foreach { flag value } [lreplace $args 0 0] { + set saw($flag) {} + switch -exact -- $flag { + -base { + set base $value + } + -format { + set format $value + } + -gmt { + set gmt $value + } + -locale { + set locale $value + } + -timezone { + set timezone $value + } + default { + return -code error \ + -errorcode [list CLOCK badSwitch $flag] \ + "bad switch \"$flag\",\ + must be -base, -format, -gmt, -locale or -timezone" + } + } + } + + # Check options for validity + + if { [info exists saw(-gmt)] && [info exists saw(-timezone)] } { + return -code error \ + -errorcode [list CLOCK gmtWithTimezone] \ + "cannot use -gmt and -timezone in same call" + } + if { [catch { expr { wide($base) } } result] } { + return -code error \ + "expected integer but got \"$base\"" + } + if { ![string is boolean $gmt] } { + return -code error \ + "expected boolean value but got \"$gmt\"" + } else { + if { $gmt } { + set timezone :GMT + } + } + + if { ![info exists saw(-format)] } { + if { [info exists saw(-timezone)] || [info exists saw(-locale)] } { + return -code error \ + -errorcode [list CLOCK flagWithLegacyFormat] \ + "legacy \[clock scan\] does not support -timezone or\ + -locale" + + } + if { [catch { + Oldscan $string -base $base -gmt $gmt + } retval] } { + return -code error \ + -errorcode $::errorCode -errorinfo $::errorInfo \ + $retval + } else { + return $retval + } + } + + # Change locale if a fresh locale has been given on the command line. + + EnterLocale $locale oldLocale + + set status [catch { + + # Map away the locale-dependent composite format groups + + set format [LocalizeFormat $format] + set scanner [ParseClockScanFormat $format] + $scanner $string $base $timezone + + } result] + + # Restore the locale + + if { [info exists oldLocale] } { + mclocale $oldLocale + } + + if { $status == 1 } { + if { [lindex $::errorCode 0] eq {clock} } { + return -code error $result + } else { + return -code error \ + -errorcode $::errorCode -errorinfo $::errorInfo \ + $result + } + } else { + return $result + } + +} + +#---------------------------------------------------------------------- +# +# ParseClockScanFormat -- +# +# Parses a format string given to [clock scan -format] +# +# Parameters: +# None. +# +# Results: +# Constructs and returns a procedure that accepts the +# string being scanned, the base time, and the time zone. +# The procedure will either return the scanned time or +# else throw an error that should be rethrown to the caller +# of [clock scan] +# +# Side effects: +# The given procedure is defined in the ::tcl::clock +# namespace. Scan procedures are not deleted once installed. +# +# Why do we parse dates by defining a procedure to parse them? +# The reason is that by doing so, we have one convenient place to +# cache all the information: the regular expressions that match the +# patterns (which will be compiled), the code that assembles the +# date information, everything lands in one place. In this way, +# when a given format is reused at run time, all the information +# of how to apply it is available in a single place. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::ParseClockScanFormat { formatString } { + + variable DateParseActions + variable TimeParseActions + + # Condense whitespace + + regsub -all {[[:space:]]+} $formatString { } formatString + + # Check whether the format has been parsed previously, and return + # the existing recognizer if it has. + + set procName [namespace current]::scanproc'$formatString'[mclocale] + if { [info procs $procName] != {} } { + return $procName + } + + # Walk through the groups of the format string. In this loop, we + # accumulate: + # - a regular expression that matches the string, + # - the count of capturing brackets in the regexp + # - a set of code that post-processes the fields captured by the regexp, + # - a dictionary whose keys are the names of fields that are present + # in the format string. + + set re {^[[:space:]]*} + set captureCount 0 + set postcode {} + set fieldSet [dict create] + set fieldCount 0 + set postSep {} + set state {} + + foreach c [split $formatString {}] { + switch -exact -- $state { + {} { + if { $c eq "%" } { + set state % + } elseif { $c eq " " } { + append re {[[:space:]]+} + } else { + if { ! [string is alnum $c] } { + append re \\ + } + append re $c + } + } + % { + set state {} + switch -exact -- $c { + % { + append re % + } + { } { + append re "\[\[:space:\]\]*" + } + a - A { # Day of week, in words + set l {} + foreach \ + i {7 1 2 3 4 5 6} \ + abr [mc DAYS_OF_WEEK_ABBREV] \ + full [mc DAYS_OF_WEEK_FULL] { + dict set l $abr $i + dict set l $full $i + incr i + } + foreach { regex lookup } [UniquePrefixRegexp $l] break + append re ( $regex ) + dict set fieldSet dayOfWeek [incr fieldCount] + append postcode "dict set date dayOfWeek \[" \ + "dict get " [list $lookup] " \$field" \ + [incr captureCount] \ + "\]\n" + } + b - B - h { # Name of month + set i 0 + set l {} + foreach \ + abr [mc MONTHS_ABBREV] \ + full [mc MONTHS_FULL] { + incr i + dict set l $abr $i + dict set l $full $i + } + foreach { regex lookup } [UniquePrefixRegexp $l] break + append re ( $regex ) + dict set fieldSet month [incr fieldCount] + append postcode "dict set date month \[" \ + "dict get " [list $lookup] " \$field" \ + [incr captureCount] \ + "\]\n" + } + C { # Gregorian century + append re \\s*(\\d\\d?) + dict set fieldSet century [incr fieldCount] + append postcode "dict set date century \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + d - e { # Day of month + append re \\s*(\\d\\d?) + dict set fieldSet dayOfMonth [incr fieldCount] + append postcode "dict set date dayOfMonth \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + E { # Prefix for locale-specific codes + set state %E + } + g { # ISO8601 2-digit year + append re \\s*(\\d\\d) + dict set fieldSet iso8601YearOfCentury \ + [incr fieldCount] + append postcode \ + "dict set date iso8601YearOfCentury \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + G { # ISO8601 4-digit year + append re \\s*(\\d\\d)(\\d\\d) + dict set fieldSet iso8601Century [incr fieldCount] + dict set fieldSet iso8601YearOfCentury \ + [incr fieldCount] + append postcode \ + "dict set date iso8601Century \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" \ + "dict set date iso8601YearOfCentury \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + H - k { # Hour of day + append re \\s*(\\d\\d?) + dict set fieldSet hour [incr fieldCount] + append postcode "dict set date hour \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + I - l { # Hour, AM/PM + append re \\s*(\\d\\d?) + dict set fieldSet hourAMPM [incr fieldCount] + append postcode "dict set date hourAMPM \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + j { # Day of year + append re \\s*(\\d\\d?\\d?) + dict set fieldSet dayOfYear [incr fieldCount] + append postcode "dict set date dayOfYear \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + J { # Julian Day Number + append re \\s*(\\d+) + dict set fieldSet julianDay [incr fieldCount] + append postcode "dict set date julianDay \[" \ + "::scan \$field" [incr captureCount] " %ld" \ + "\]\n" + } + m - N { # Month number + append re \\s*(\\d\\d?) + dict set fieldSet month [incr fieldCount] + append postcode "dict set date month \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + M { # Minute + append re \\s*(\\d\\d?) + dict set fieldSet minute [incr fieldCount] + append postcode "dict set date minute \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + n { # Literal newline + append re \\n + } + O { # Prefix for locale numerics + set state %O + } + p - P { # AM/PM indicator + set l [list [mc AM] 0 [mc PM] 1] + foreach { regex lookup } [UniquePrefixRegexp $l] break + append re ( $regex ) + dict set fieldSet amPmIndicator [incr fieldCount] + append postcode "dict set date amPmIndicator \[" \ + "dict get " [list $lookup] " \[string tolower " \ + "\$field" \ + [incr captureCount] \ + "\]\]\n" + } + Q { # Hi, Jeff! + append re {Stardate\s+([-+]?\d+)(\d\d\d)[.](\d)} + incr captureCount + dict set fieldSet seconds [incr fieldCount] + append postcode {dict set date seconds } \[ \ + {ParseStarDate $field} [incr captureCount] \ + { $field} [incr captureCount] \ + { $field} [incr captureCount] \ + \] \n + } + s { # Seconds from Posix Epoch + # This next case is insanely difficult, + # because it's problematic to determine + # whether the field is actually within + # the range of a wide integer. + append re {\s*([-+]?\d+)} + dict set fieldSet seconds [incr fieldCount] + append postcode {dict set date seconds } \[ \ + {ScanWide $field} [incr captureCount] \] \n + } + S { # Second + append re \\s*(\\d\\d?) + dict set fieldSet second [incr fieldCount] + append postcode "dict set date second \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + t { # Literal tab character + append re \\t + } + u - w { # Day number within week, 0 or 7 == Sun + # 1=Mon, 6=Sat + append re \\s*(\\d) + dict set fieldSet dayOfWeek [incr fieldCount] + append postcode {::scan $field} [incr captureCount] \ + { %d dow} \n \ + { + if { $dow == 0 } { + set dow 7 + } elseif { $dow > 7 } { + return -code error \ + -errorcode [list CLOCK badDayOfWeek] \ + "day of week is greater than 7" + } + dict set date dayOfWeek $dow + } + } + U { # Week of year. The + # first Sunday of the year is the + # first day of week 01. No scan rule + # uses this group. + append re \\s*\\d\\d? + } + V { # Week of ISO8601 year + + append re \\s*(\\d\\d?) + dict set fieldSet iso8601Week [incr fieldCount] + append postcode "dict set date iso8601Week \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + W { # Week of the year (00-53). The first + # Monday of the year is the first day + # of week 01. No scan rule uses this + # group. + append re \\s*\\d\\d? + } + y { # Two-digit Gregorian year + append re \\s*(\\d\\d?) + dict set fieldSet yearOfCentury [incr fieldCount] + append postcode "dict set date yearOfCentury \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + Y { # 4-digit Gregorian year + append re \\s*(\\d\\d)(\\d\\d) + dict set fieldSet century [incr fieldCount] + dict set fieldSet yearOfCentury [incr fieldCount] + append postcode \ + "dict set date century \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" \ + "dict set date yearOfCentury \[" \ + "::scan \$field" [incr captureCount] " %d" \ + "\]\n" + } + z - Z { # Time zone name + append re {(?:([-+]\d\d:?\d\d(?::?\d\d)?)|([[:alnum:]]{1,4}))} + dict set fieldSet tzName [incr fieldCount] + append postcode \ + {if } \{ { $field} [incr captureCount] \ + { ne "" } \} { } \{ \n \ + {dict set date tzName $field} \ + $captureCount \n \ + \} { else } \{ \n \ + {dict set date tzName } \[ \ + {ConvertLegacyTimeZone $field} \ + [incr captureCount] \] \n \ + \} \n \ + } + % { # Literal percent character + append re % + } + default { + append re % + if { ! [string is alnum $c] } { + append re \\ + } + append re $c + } + } + } + %E { + switch -exact -- $c { + C { # Locale-dependent era + set d {} + foreach triple [mc LOCALE_ERAS] { + foreach {t symbol year} $triple break + dict set d $symbol $year + } + foreach { regex lookup } [UniquePrefixRegexp $d] break + append re (?: $regex ) + + } + y { # Locale-dependent year of the era + foreach {regex lookup} [LocaleNumeralMatcher] break + append re $regex + incr fieldCount + } + default { + append re %E + if { ! [string is alnum $c] } { + append re \\ + } + append re $c + } + } + set state {} + } + %O { + switch -exact -- $c { + d - e { + foreach {regex lookup} [LocaleNumeralMatcher] break + append re $regex + dict set fieldSet dayOfMonth [incr fieldCount] + append postcode "dict set date dayOfMonth \[" \ + "dict get " [list $lookup] " \$field" \ + [incr captureCount] \ + "\]\n" + } + H - k { + foreach {regex lookup} [LocaleNumeralMatcher] break + append re $regex + dict set fieldSet hour [incr fieldCount] + append postcode "dict set date hour \[" \ + "dict get " [list $lookup] " \$field" \ + [incr captureCount] \ + "\]\n" + } + I - l { + foreach {regex lookup} [LocaleNumeralMatcher] break + append re $regex + dict set fieldSet hourAMPM [incr fieldCount] + append postcode "dict set date hourAMPM \[" \ + "dict get " [list $lookup] " \$field" \ + [incr captureCount] \ + "\]\n" + } + m { + foreach {regex lookup} [LocaleNumeralMatcher] break + append re $regex + dict set fieldSet month [incr fieldCount] + append postcode "dict set date month \[" \ + "dict get " [list $lookup] " \$field" \ + [incr captureCount] \ + "\]\n" + } + M { + foreach {regex lookup} [LocaleNumeralMatcher] break + append re $regex + dict set fieldSet minute [incr fieldCount] + append postcode "dict set date minute \[" \ + "dict get " [list $lookup] " \$field" \ + [incr captureCount] \ + "\]\n" + } + S { + foreach {regex lookup} [LocaleNumeralMatcher] break + append re $regex + dict set fieldSet second [incr fieldCount] + append postcode "dict set date second \[" \ + "dict get " [list $lookup] " \$field" \ + [incr captureCount] \ + "\]\n" + } + u - w { + foreach {regex lookup} [LocaleNumeralMatcher] break + append re $regex + dict set fieldSet dayOfWeek [incr fieldCount] + append postcode "set dow \[dict get " [list $lookup] \ + { $field} [incr captureCount] \] \n \ + { + if { $dow == 0 } { + set dow 7 + } elseif { $dow > 7 } { + return -code error \ + -errorcode [list CLOCK badDayOfWeek] \ + "day of week is greater than 7" + } + dict set date dayOfWeek $dow + } + } + y { + foreach {regex lookup} [LocaleNumeralMatcher] break + append re $regex + dict set fieldSet yearOfCentury [incr fieldCount] + append postcode {dict set date yearOfCentury } \[ \ + {dict get } [list $lookup] { $field} \ + [incr captureCount] \] \n + } + default { + append re %O + if { ! [string is alnum $c] } { + append re \\ + } + append re $c + } + } + set state {} + } + } + } + + # Clean up any unfinished format groups + + append re $state \\s*\$ + + # Build the procedure + + set procBody \n + append procBody "if \{ !\[ regexp -nocase [list $re] \$string ->" + for { set i 1 } { $i <= $captureCount } { incr i } { + append procBody " " field $i + } + append procBody "\] \} \{" \n + append procBody { + return -code error -errorcode [list CLOCK badInputString] \ + {input string does not match supplied format} + } + append procBody \}\n + append procBody "set date \[dict create\]" \n + append procBody {dict set date tzName $timeZone} \n + append procBody $postcode + + # Add code that gets Julian Day Number from the fields. + + append procBody [MakeParseCodeFromFields $fieldSet $DateParseActions] + + # Get time of day + + append procBody [MakeParseCodeFromFields $fieldSet $TimeParseActions] + + # Assemble seconds, and convert local nominal time to UTC. + + if { ![dict exists $fieldSet seconds] + && ![dict exists $fieldSet starDate] } { + append procBody { + if { [dict get $date julianDay] > $::tcl::clock::JD31Dec9999 } { + return -code error -errorcode [list CLOCK dateTooLarge] \ + "requested date too large to represent" + } + dict set date localSeconds \ + [expr { -$::tcl::clock::PosixEpochAsJulianSeconds + + ( $::tcl::clock::SecondsPerDay + * wide([dict get $date julianDay]) ) + + [dict get $date secondOfDay] }] + } + } + + if { ![dict exists $fieldSet seconds] + && ![dict exists $fieldSet starDate] } { + append procBody { + set date [::tcl::clock::ConvertLocalToUTC [K $date [set date {}]]] + } + } + + # Return result + + append procBody {return [dict get $date seconds]} \n + + proc $procName { string baseTime timeZone } $procBody + + # puts [list proc $procName [list string baseTime timeZone] $procBody] + + return $procName +} + +#---------------------------------------------------------------------- +# +# LocaleNumeralMatcher -- +# +# Composes a regexp that captures the numerals in the given +# locale, and a dictionary to map them to conventional numerals. +# +# Parameters: +# none. +# +# Results: +# Returns a two-element list comprising the regexp and the +# dictionary. +# +# Side effects: +# Caches the result. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::LocaleNumeralMatcher {} { + + variable LocaleNumeralCache + + set l [mclocale] + if { ![dict exists $LocaleNumeralCache $l] } { + set d {} + set i 0 + set sep \( + foreach n [mc LOCALE_NUMERALS] { + dict set d $n $i + regsub -all {[^[:alnum:]]} $n \\\\& subex + append re $sep $subex + set sep | + incr i + } + append re \) + dict set LocaleNumeralCache $l [list $re $d] + } + return [dict get $LocaleNumeralCache $l] +} + + + +#---------------------------------------------------------------------- +# +# UniquePrefixRegexp -- +# +# Composes a regexp that performs unique-prefix matching. The +# RE matches one of a supplied set of strings, or any unique +# prefix thereof. +# +# Parameters: +# data - List of alternating match-strings and values. +# Match-strings with distinct values are considered +# distinct. +# +# Results: +# Returns a two-element list. The first is a regexp that +# matches any unique prefix of any of the strings. The second +# is a dictionary whose keys are match values from the regexp +# and whose values are the corresponding values from 'data'. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::UniquePrefixRegexp { data } { + + # The 'successors' dictionary will contain, for each string that + # is a prefix of any key, all characters that may follow that + # prefix. The 'prefixMapping' dictionary will have keys that + # are prefixes of keys and values that correspond to the keys. + + set prefixMapping [dict create] + set successors [dict create {} {}] + + # Walk the key-value pairs + + foreach { key value } $data { + + # Construct all prefixes of the key; + + set prefix {} + foreach char [split $key {}] { + set oldPrefix $prefix + dict set successors $oldPrefix $char {} + append prefix $char + + # Put the prefixes in the 'prefixMapping' and 'successors' + # dictionaries + + dict lappend prefixMapping $prefix $value + if { ![dict exists $successors $prefix] } { + dict set successors $prefix {} + } + } + } + + # Identify those prefixes that designate unique values, and + # those that are the full keys + + set uniquePrefixMapping {} + dict for { key valueList } $prefixMapping { + if { [llength $valueList] == 1 } { + dict set uniquePrefixMapping $key [lindex $valueList 0] + } + } + foreach { key value } $data { + dict set uniquePrefixMapping $key $value + } + + # Construct the re. + + return [list \ + [MakeUniquePrefixRegexp $successors $uniquePrefixMapping {}] \ + $uniquePrefixMapping] +} + +#---------------------------------------------------------------------- +# +# MakeUniquePrefixRegexp -- +# +# Service procedure for 'UniquePrefixRegexp' that constructs +# a regular expresison that matches the unique prefixes. +# +# Parameters: +# successors - Dictionary whose keys are all prefixes +# of keys passed to 'UniquePrefixRegexp' and whose +# values are dictionaries whose keys are the characters +# that may follow those prefixes. +# uniquePrefixMapping - Dictionary whose keys are the unique +# prefixes and whose values are not examined. +# prefixString - Current prefix being processed. +# +# Results: +# Returns a constructed regular expression that matches the set +# of unique prefixes beginning with the 'prefixString'. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::MakeUniquePrefixRegexp { successors + uniquePrefixMapping + prefixString } { + + # Get the characters that may follow the current prefix string + + set schars [lsort -ascii [dict keys [dict get $successors $prefixString]]] + if { [llength $schars] == 0 } { + return {} + } + + # If there is more than one successor character, or if the current + # prefix is a unique prefix, surround the generated re with non-capturing + # parentheses. + + set re {} + if { [dict exists $uniquePrefixMapping $prefixString] + || [llength $schars] > 1 } { + append re "(?:" + } + + # Generate a regexp that matches the successors. + + set sep "" + foreach { c } $schars { + set nextPrefix $prefixString$c + regsub -all {[^[:alnum:]]} $c \\\\& rechar + append re $sep $rechar \ + [MakeUniquePrefixRegexp \ + $successors $uniquePrefixMapping $nextPrefix] + set sep | + } + + # If the current prefix is a unique prefix, make all following text + # optional. Otherwise, if there is more than one successor character, + # close the non-capturing parentheses. + + if { [dict exists $uniquePrefixMapping $prefixString] } { + append re ")?" + } elseif { [llength $schars] > 1 } { + append re ")" + } + + return $re +} + +#---------------------------------------------------------------------- +# +# MakeParseCodeFromFields -- +# +# Composes Tcl code to extract the Julian Day Number from a +# dictionary containing date fields. +# +# Parameters: +# dateFields -- Dictionary whose keys are fields of the date, +# and whose values are the rightmost positions +# at which those fields appear. +# parseActions -- List of triples: field set, priority, and +# code to emit. Smaller priorities are better, and +# the list must be in ascending order by priority +# +# Results: +# Returns a burst of code that extracts the day number from the +# given date. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::MakeParseCodeFromFields { dateFields parseActions } { + + set currPrio 999 + set currFieldPos [list] + set currCodeBurst { + error "in ::tcl::clock::MakeParseCodeFromFields: can't happen" + } + + foreach { fieldSet prio parseAction } $parseActions { + + # If we've found an answer that's better than any that follow, + # quit now. + + if { $prio > $currPrio } { + break + } + + # Accumulate the field positions that are used in the current + # field grouping. + + set fieldPos [list] + set ok true + foreach field $fieldSet { + if { ! [dict exists $dateFields $field] } { + set ok 0 + break + } + lappend fieldPos [dict get $dateFields $field] + } + + # Quit if we don't have a complete set of fields + if { !$ok } { + continue + } + + # Determine whether the current answer is better than the last. + + set fPos [lsort -integer -decreasing $fieldPos] + + if { $prio == $currPrio } { + foreach currPos $currFieldPos newPos $fPos { + if { ![string is integer $newPos] + || ![string is integer $currPos] + || $newPos > $currPos } { + break + } + if { $newPos < $currPos } { + set ok 0 + break + } + } + } + if { !$ok } { + continue + } + + # Remember the best possibility for extracting date information + + set currPrio $prio + set currFieldPos $fPos + set currCodeBurst $parseAction + + } + + return $currCodeBurst + +} + +#---------------------------------------------------------------------- +# +# EnterLocale -- +# +# Switch [mclocale] to a given locale if necessary +# +# Parameters: +# locale -- Desired locale +# oldLocaleVar -- Name of a variable in caller's scope that +# tracks the previous locale name. +# +# Results: +# Returns the locale that was previously current. +# +# Side effects: +# Does [mclocale]. If necessary, uses [mcload] to load the +# designated locale's files, and tracks that it has done so +# in the 'McLoaded' variable. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::EnterLocale { locale oldLocaleVar } { + + upvar 1 $oldLocaleVar oldLocale + + variable MsgDir + variable McLoaded + + set oldLocale [mclocale] + if { $locale eq {system} } { + + if { $::tcl_platform(platform) ne {windows} } { + + # On a non-windows platform, the 'system' locale is + # the same as the 'current' locale + + set locale current + } else { + + # On a windows platform, the 'system' locale is + # adapted from the 'current' locale by applying the + # date and time formats from the Control Panel. + # First, load the 'current' locale if it's not yet loaded + + if {![dict exists $McLoaded $oldLocale] } { + mcload $MsgDir + dict set McLoaded $oldLocale {} + } + + # Make a new locale string for the system locale, and + # get the Control Panel information + + set locale ${oldLocale}_windows + if { ![dict exists $McLoaded $locale] } { + LoadWindowsDateTimeFormats $locale + dict set mcloaded $locale {} + } + } + } + if { $locale eq {current}} { + set locale $oldLocale + unset oldLocale + } elseif { $locale eq $oldLocale } { + unset oldLocale + } else { + mclocale $locale + } + if { ![dict exists $McLoaded $locale] } { + mcload $MsgDir + dict set McLoaded $locale {} + } + +} + +#---------------------------------------------------------------------- +# +# LoadWindowsDateTimeFormats -- +# +# Load the date/time formats from the Control Panel in Windows +# and convert them so that they're usable by Tcl. +# +# Parameters: +# locale - Name of the locale in whose message catalog +# the converted formats are to be stored. +# +# Results: +# None. +# +# Side effects: +# Updates the given message catalog with the locale strings. +# +# Presumes that on entry, [mclocale] is set to the current locale, +# so that default strings can be obtained if the Registry query +# fails. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::LoadWindowsDateTimeFormats { locale } { + + if { ![catch { + registry get "HKEY_CURRENT_USER\\Control Panel\\International" \ + sShortDate + } string] } { + set quote {} + set datefmt {} + foreach { unquoted quoted } [split $string '] { + append datefmt $quote [string map { + dddd %A + ddd %a + dd %d + d %e + MMMM %B + MMM %b + MM %m + M %N + yyyy %Y + yy %y + y %y + gg {} + } $unquoted] + if { $quoted eq {} } { + set quote ' + } else { + set quote $quoted + } + } + ::msgcat::mcset $locale DATE_FORMAT $datefmt + } + + if { ![catch { + registry get "HKEY_CURRENT_USER\\Control Panel\\International" \ + sLongDate + } string] } { + set quote {} + set ldatefmt {} + foreach { unquoted quoted } [split $string '] { + append ldatefmt $quote [string map { + dddd %A + ddd %a + dd %d + d %e + MMMM %B + MMM %b + MM %m + M %N + yyyy %Y + yy %y + y %y + gg {} + } $unquoted] + if { $quoted eq {} } { + set quote ' + } else { + set quote $quoted + } + } + ::msgcat::mcset $locale LOCALE_DATE_FORMAT $ldatefmt + } + + if { ![catch { + registry get "HKEY_CURRENT_USER\\Control Panel\\International" \ + sTimeFormat + } string] } { + set quote {} + set timefmt {} + foreach { unquoted quoted } [split $string '] { + append timefmt $quote [string map { + HH %H + H %k + hh %I + h %l + mm %M + m %M + ss %S + s %S + tt %p + t %p + } $unquoted] + if { $quoted eq {} } { + set quote ' + } else { + set quote $quoted + } + } + ::msgcat::mcset $locale TIME_FORMAT $timefmt + } + + catch { + ::msgcat::mcset $locale DATE_TIME_FORMAT "$datefmt $timefmt" + } + catch { + ::msgcat::mcset $locale LOCALE_DATE_TIME_FORMAT "$ldatefmt $timefmt" + } + + return + +} + +#---------------------------------------------------------------------- +# +# LocalizeFormat -- +# +# Map away locale-dependent format groups in a clock format. +# +# Parameters: +# format -- Format supplied to [clock scan] or [clock format] +# +# Results: +# Returns the string with locale-dependent composite format +# groups substituted out. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::LocalizeFormat { format } { + + # Handle locale-dependent format groups by mapping them out of + # the input string. Note that the order of the [string map] + # operations is significant because earlier formats can refer + # to later ones; for example %c can refer to %X, which in turn + # can refer to %T. + + set format [string map [list %c [mc DATE_TIME_FORMAT] \ + %Ec [mc LOCALE_DATE_TIME_FORMAT]] $format] + set format [string map [list %x [mc DATE_FORMAT] \ + %Ex [mc LOCALE_DATE_FORMAT] \ + %X [mc TIME_FORMAT] \ + %EX [mc LOCALE_TIME_FORMAT]] $format] + set format [string map [list %r [mc TIME_FORMAT_12] \ + %R [mc TIME_FORMAT_24] \ + %T [mc TIME_FORMAT_24_SECS]] $format] + set format [string map [list %D %m/%d/%Y \ + %EY [mc LOCALE_YEAR_FORMAT]\ + %+ {%a %b %e %H:%M:%S %Z %Y}] $format] + return $format +} + +#---------------------------------------------------------------------- +# +# FormatStarDate -- +# +# Formats a date as a StarDate. +# +# Parameters: +# date - Dictionary containing 'year', 'dayOfYear', and +# 'localSeconds' fields. +# +# Results: +# Returns the given date formatted as a StarDate. +# +# Side effects: +# None. +# +# Jeff Hobbs put this in to support an atrocious pun about Tcl being +# "Enterprise ready." Now we're stuck with it. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::FormatStarDate { date } { + + variable DaysPerYear + variable SecondsPerDay + variable Roddenberry + + # Get day of year, zero based + + set doy [expr { [dict get $date dayOfYear] - 1 }] + + # Determine whether the year is a leap year + + if { [dict get $date gregorian] } { + set lp [IsGregorianLeapYear $date] + } else { + set lp [expr { [dict get $date year] % 4 == 0 }] + } + + # Convert day of year to a fractional year + + if { $lp } { + set fractYear [expr { 1000 * $doy / ( $DaysPerYear + 1 ) }] + } else { + set fractYear [expr { 1000 * $doy / $DaysPerYear }] + } + + # Put together the StarDate + + return [::format "Stardate %02d%03d.%1d" \ + [expr { [dict get $date year] - $Roddenberry }] \ + $fractYear \ + [expr { [dict get $date localSeconds] % $SecondsPerDay + / ( $SecondsPerDay / 10 ) }]] +} + +#---------------------------------------------------------------------- +# +# ParseStarDate -- +# +# Parses a StarDate +# +# Parameters: +# year - Year from the Roddenberry epoch +# fractYear - Fraction of a year specifiying the day of year. +# fractDay - Fraction of a day +# +# Results: +# Returns a count of seconds from the Posix epoch. +# +# Side effects: +# None. +# +# Jeff Hobbs put this in to support an atrocious pun about Tcl being +# "Enterprise ready." Now we're stuck with it. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::ParseStarDate { year fractYear fractDay } { + + variable Roddenberry + variable DaysPerYear + variable SecondsPerDay + variable PosixEpochAsJulianSeconds + + # Build a tentative date from year and fraction. + + set date [dict create \ + era CE \ + year [expr { $year + $Roddenberry }] \ + dayOfYear [expr { $fractYear * $DaysPerYear / 1000 + 1 }]] + set date [GetJulianDayFromGregorianEraYearDay [K $date [set date {}]]] + + # Determine whether the given year is a leap year + + if { [dict get $date gregorian] } { + set lp [IsGregorianLeapYear $date] + } else { + set lp [expr { [dict get $date year] % 4 == 0 }] + } + + # Reconvert the fractional year according to whether the given + # year is a leap year + + if { $lp } { + dict set date dayOfYear \ + [expr { $fractYear * ( $DaysPerYear + 1 ) / 1000 + 1 }] + } else { + dict set date dayOfYear \ + [expr { $fractYear * $DaysPerYear / 1000 + 1 }] + } + dict unset date julianDay + dict unset date gregorian + set date [GetJulianDayFromGregorianEraYearDay [K $date [set date {}]]] + + return [expr { $SecondsPerDay * [dict get $date julianDay] + - $PosixEpochAsJulianSeconds + + ( $SecondsPerDay / 10 ) * $fractDay }] + +} + +#---------------------------------------------------------------------- +# +# ScanWide -- +# +# Scans a wide integer from an input +# +# Parameters: +# str - String containing a decimal wide integer +# +# Results: +# Returns the string as a pure wide integer. Throws an error if +# the string is misformatted or out of range. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::ScanWide { str } { + set count [::scan $str {%ld %c} result junk] + if { $count != 1 } { + return -code error -errorcode [list CLOCK notAnInteger $str] \ + "\"$str\" is not an integer" + } + if { [incr result 0] != $str } { + return -code error -errorcode [list CLOCK integervalueTooLarge] \ + "integer value too large to represent" + } + return $result +} + +#---------------------------------------------------------------------- +# +# InterpretTwoDigitYear -- +# +# Given a date that contains only the year of the century, +# determines the target value of a two-digit year. +# +# Parameters: +# date - Dictionary containing fields of the date. +# baseTime - Base time relative to which the date is expressed. +# twoDigitField - Name of the field that stores the two-digit year. +# Default is 'yearOfCentury' +# fourDigitField - Name of the field that will receive the four-digit +# year. Default is 'year' +# +# Results: +# Returns the dictionary augmented with the four-digit year, stored in +# the given key. +# +# Side effects: +# None. +# +# The current rule for interpreting a two-digit year is that the year +# shall be between 1937 and 2037, thus staying within the range of a +# 32-bit signed value for time. This rule may change to a sliding +# window in future versions, so the 'baseTime' parameter (which is +# currently ignored) is provided in the procedure signature. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::InterpretTwoDigitYear { date baseTime + { twoDigitField yearOfCentury } + { fourDigitField year } } { + + set yr [dict get $date $twoDigitField] + if { $yr <= 37 } { + dict set date $fourDigitField [expr { $yr + 2000 }] + } else { + dict set date $fourDigitField [expr { $yr + 1900 }] + } + return $date + +} + +#---------------------------------------------------------------------- +# +# AssignBaseYear -- +# +# Places the number of the current year into a dictionary. +# +# Parameters: +# date - Dictionary value to update +# baseTime - Base time from which to extract the year, expressed +# in seconds from the Posix epoch +# +# Results: +# Returns the dictionary with the current year assigned. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::AssignBaseYear { date baseTime timeZone } { + + variable PosixEpochAsJulianSeconds + variable SecondsPerDay + + # Find the Julian Day Number corresponding to the base time, and + # find the Gregorian year corresponding to that Julian Day. + + set date2 [dict create seconds $baseTime] + set date2 [ConvertUTCToLocal [K $date2 [set date2 {}]] $timeZone] + set date2 [GetJulianDay [K $date2 [set date2 {}]]] + set date2 [GetGregorianEraYearDay [K $date2 [set date2 {}]]] + + # Store the converted year + + dict set date era [dict get $date2 era] + dict set date year [dict get $date2 year] + + return $date + +} + +#---------------------------------------------------------------------- +# +# AssignBaseIso8601Year -- +# +# Determines the base year in the ISO8601 fiscal calendar. +# +# Parameters: +# date - Dictionary containing the fields of the date that +# is to be augmented with the base year. +# baseTime - Base time expressed in seconds from the Posix epoch. +# +# Results: +# Returns the given date with "iso8601Year" set to the +# base year. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::AssignBaseIso8601Year { date baseTime timeZone } { + variable PosixEpochAsJulianSeconds + variable SecondsPerDay + + # Find the Julian Day Number corresponding to the base time + + set date2 [dict create seconds $baseTime] + set date2 [ConvertUTCToLocal [K $date2 [set date2 {}]] $timeZone] + set date2 [GetJulianDay [K $date2 [set date2 {}]]] + + # Calculate the ISO8601 date and transfer the year + + set date2 [GetYearWeekDay [K $date2 [set date2 {}]]] + dict set date era CE + dict set date iso8601Year [dict get $date2 iso8601Year] + return $date +} + +#---------------------------------------------------------------------- +# +# AssignBaseMonth -- +# +# Places the number of the current year and month into a +# dictionary. +# +# Parameters: +# date - Dictionary value to update +# baseTime - Time from which the year and month are to be +# obtained, expressed in seconds from the Posix epoch. +# +# Results: +# Returns the dictionary with the base year and month assigned. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::AssignBaseMonth { date baseTime timeZone } { + + variable PosixEpochAsJulianSeconds + variable SecondsPerDay + + # Find the Julian Day Number corresponding to the base time + + set date2 [dict create seconds $baseTime] + set date2 [ConvertUTCToLocal [K $date2 [set date2 {}]] $timeZone] + set date2 [GetJulianDay [K $date2 [set date2 {}]]] + + # Find the Gregorian year corresponding to that Julian Day + + set date2 [GetGregorianEraYearDay [K $date2 [set date2 {}]]] + set date2 [GetMonthDay [K $date2 [set date2 {}]]] + dict set date era [dict get $date2 era] + dict set date year [dict get $date2 year] + dict set date month [dict get $date2 month] + return $date + +} + +#---------------------------------------------------------------------- +# +# AssignBaseWeek -- +# +# Determines the base year and week in the ISO8601 fiscal calendar. +# +# Parameters: +# date - Dictionary containing the fields of the date that +# is to be augmented with the base year and week. +# baseTime - Base time expressed in seconds from the Posix epoch. +# +# Results: +# Returns the given date with "iso8601Year" set to the +# base year and "iso8601Week" to the week number. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::AssignBaseWeek { date baseTime timeZone } { + variable PosixEpochAsJulianSeconds + variable SecondsPerDay + + # Find the Julian Day Number corresponding to the base time + + set date2 [dict create seconds $baseTime] + set date2 [ConvertUTCToLocal [K $date2 [set date2 {}]] $timeZone] + set date2 [GetJulianDay [K $date2 [set date2 {}]]] + + # Calculate the ISO8601 date and transfer the year + + set date2 [GetYearWeekDay [K $date2 [set date2 {}]]] + dict set date era CE + dict set date iso8601Year [dict get $date2 iso8601Year] + dict set date iso8601Week [dict get $date2 iso8601Week] + return $date +} + +#---------------------------------------------------------------------- +# +# AssignBaseJulianDay -- +# +# Determines the base day for a time-of-day conversion. +# +# Parameters: +# date - Dictionary that is to get the base day +# baseTime - Base time expressed in seconds from the Posix epoch +# +# Results: +# Returns the given dictionary augmented with a 'julianDay' field +# that contains the base day. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::AssignBaseJulianDay { date baseTime timeZone } { + + variable PosixEpochAsJulianSeconds + variable SecondsPerDay + + # Find the Julian Day Number corresponding to the base time + + set date2 [dict create seconds $baseTime] + set date2 [ConvertUTCToLocal [K $date2 [set date2 {}]] $timeZone] + set date2 [GetJulianDay [K $date2 [set date2 {}]]] + dict set date julianDay [dict get $date2 julianDay] + + return $date +} + +#---------------------------------------------------------------------- +# +# InterpretHMSP -- +# +# Interprets a time in the form "hh:mm:ss am". +# +# Parameters: +# date -- Dictionary containing "hourAMPM", "minute", "second" +# and "amPmIndicator" fields. +# +# Results: +# Returns the number of seconds from local midnight. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::InterpretHMSP { date } { + + set hr [dict get $date hourAMPM] + if { $hr == 12 } { + set hr 0 + } + if { [dict get $date amPmIndicator] } { + incr hr 12 + } + dict set date hour $hr + return [InterpretHMS [K $date [set date {}]]] + +} + +#---------------------------------------------------------------------- +# +# InterpretHMS -- +# +# Interprets a 24-hour time "hh:mm:ss" +# +# Parameters: +# date -- Dictionary containing the "hour", "minute" and "second" +# fields. +# +# Results: +# Returns the given dictionary augmented with a "secondOfDay" +# field containing the number of seconds from local midnight. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::InterpretHMS { date } { + + variable SecondsPerMinute + variable MinutesPerHour + + return [expr { ( [dict get $date hour] * $MinutesPerHour + + [dict get $date minute] ) * $SecondsPerMinute + + [dict get $date second] }] + +} + +#---------------------------------------------------------------------- +# +# GetSystemTimeZone -- +# +# Determines the system time zone, which is the default for the +# 'clock' command if no other zone is supplied. +# +# Parameters: +# None. +# +# Results: +# Returns the system time zone. +# +# Side effects: +# Stores the sustem time zone in the 'CachedSystemTimeZone' +# variable, since determining it may be an expensive process. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::GetSystemTimeZone {} { + + variable CachedSystemTimeZone + + if { [info exists ::env(TCL_TZ)] } { + set timezone $::env(TCL_TZ) + } elseif { [info exists ::env(TZ)] } { + set timezone $::env(TZ) + } elseif { $::tcl_platform(platform) eq {windows} } { + if { [info exists CachedSystemTimeZone] } { + set timezone $CachedSystemTimeZone + } else { + set timezone [GuessWindowsTimeZone] + set CachedSystemTimeZone $timezone + } + } else { + set timezone :localtime + } + if { [catch {SetupTimeZone $timezone}] } { + set timezone :localtime + } + return $timezone + +} + +#---------------------------------------------------------------------- +# +# ConvertLegacyTimeZone -- +# +# Given an alphanumeric time zone identifier and the system +# time zone, convert the alphanumeric identifier to an +# unambiguous time zone. +# +# Parameters: +# tzname - Name of the time zone to convert +# +# Results: +# Returns a time zone name corresponding to tzname, but +# in an unambiguous form, generally +hhmm. +# +# This procedure is implemented primarily to allow the parsing of +# RFC822 date/time strings. Processing a time zone name on input +# is not recommended practice, because there is considerable room +# for ambiguity; for instance, is BST Brazilian Standard Time, or +# British Summer Time? +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::ConvertLegacyTimeZone { tzname } { + + variable LegacyTimeZone + + set tzname [string tolower $tzname] + if { ![dict exists $LegacyTimeZone $tzname] } { + return -code error -errorcode [list CLOCK badTZName $tzname] \ + "time zone \"$tzname\" not found" + } else { + return [dict get $LegacyTimeZone $tzname] + } + +} + +#---------------------------------------------------------------------- +# +# ConvertLocalToUTC -- +# +# Given a time zone and nominal local seconds, compute seconds +# of UTC time from the Posix epoch. +# +# Parameters: +# date - Dictionary populated with the 'localSeconds' and +# 'tzName' fields +# +# Results: +# Returns the given dictionary augmented with a 'seconds' field. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::ConvertLocalToUTC { date } { + + variable TZData + + set timezone [dict get $date tzName] + if { $timezone eq ":localtime" } { + + # Convert using the mktime function if possible + + if { [catch { + ConvertLocalToUTCViaC [dict get $date localSeconds] + } result] } { + return -code error -errorcode $::errorCode $result + } + dict set date seconds $result + return $date + + } else { + + # Get the time zone data + + if { [catch { SetupTimeZone $timezone } retval] } { + return -code error -errorcode $::errorCode $retval + } + + # Initially assume that local == UTC, and locate the last time + # conversion prior to that time. Get the offset from that, + # and look up again. If that lookup finds a different offset, + # continue looking until we find an offset that we found + # before. The check for "any offset previously found" rather + # than "the same offset" avoids an endless loop if we try to + # convert a non-existent time, for example 2:30am during the + # US spring DST change. + + set localseconds [dict get $date localSeconds] + set utcseconds(0) $localseconds + set seconds $localseconds + while { 1 } { + set i [BSearch $TZData($timezone) $seconds] + set offset [lindex $TZData($timezone) $i 1] + if { [info exists utcseconds($offset)] } { + dict set date seconds $utcseconds($offset) + return $date + } else { + set seconds [expr { $localseconds - $offset }] + set utcseconds($offset) $seconds + } + } + + # In the absolute worst case, the loop above can visit each tzdata + # row only once, so it's guaranteed to terminate. + + error "in ConvertLocalToUTC, can't happen" + } + +} + +#---------------------------------------------------------------------- +# +# ConvertLocalToUTCViaC -- +# +# Given seconds of nominal local time, compute seconds from the +# Posix epoch. +# +# Parameters: +# localSeconds - Seconds of nominal local time +# +# Results: +# Returns the seconds from the epoch. May throw an error if +# the time is to large/small to represent, or if 'mktime' is +# not present in the C library. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::ConvertLocalToUTCViaC { localSeconds } { + + variable SecondsPerHour + variable SecondsPerMinute + variable MinutesPerHour + variable HoursPerDay + + set date [dict create localSeconds $localSeconds] + set date [GetJulianDay [K $date [set date {}]]] + set date [GetGregorianEraYearDay [K $date [set date {}]]] + set date [GetMonthDay [K $date [set date {}]]] + set retval \ + [Mktime \ + [dict get $date year] \ + [dict get $date month] \ + [dict get $date dayOfMonth] \ + [expr { $localSeconds / $SecondsPerHour % $HoursPerDay }] \ + [expr { $localSeconds / $SecondsPerMinute % $MinutesPerHour }] \ + [expr { $localSeconds % $SecondsPerMinute }]] + return $retval +} + +#---------------------------------------------------------------------- +# +# ConvertUTCToLocal -- +# +# Given the seconds from the Posix epoch, compute seconds of +# nominal local time. +# +# Parameters: +# date - Dictionary populated on entry with the 'seconds' field +# +# Results: +# The given dictionary is returned, augmented with 'localSeconds', +# 'tzOffset', and 'tzName' fields. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::ConvertUTCToLocal { date timezone } { + + variable TZData + + # Get the data for time changes in the given zone + + if { [catch { SetupTimeZone $timezone } retval] } { + return -code error -errorcode $::errorCode $retval + } + + if { $timezone eq {:localtime} } { + + # Convert using the localtime function + + if { [catch { + ConvertUTCToLocalViaC $date + } retval] } { + return -code error -errorcode $::errorCode $retval + } + return $retval + } + + # Find the most recent transition in the time zone data + + set i [BSearch $TZData($timezone) [dict get $date seconds]] + set row [lindex $TZData($timezone) $i] + foreach { junk1 offset junk2 name } $row break + + # Add appropriate offset to convert Greenwich to local, and return + # the local time + + dict set date localSeconds [expr { [dict get $date seconds] + $offset }] + dict set date tzOffset $offset + dict set date tzName $name + + return $date + +} + +#---------------------------------------------------------------------- +# +# ConvertUTCToLocalViaC -- +# +# Convert local time using the C localtime function +# +# Parameters: +# date - Dictionary populated on entry with the 'seconds' +# and 'timeZone' fields. +# +# Results: +# The given dictionary is returned, augmented with 'localSeconds', +# 'tzOffset', and 'tzName' fields. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::ConvertUTCToLocalViaC { date } { + + variable PosixEpochAsJulianSeconds + variable SecondsPerMinute + variable SecondsPerHour + variable MinutesPerHour + variable HoursPerDay + + # Get y-m-d-h-m-s from the C library + + set gmtSeconds [dict get $date seconds] + set localFields [Localtime $gmtSeconds] + set date2 [dict create] + foreach key { + year month dayOfMonth hour minute second + } value $localFields { + dict set date2 $key $value + } + dict set date2 era CE + + # Convert to Julian Day + + set date2 [GetJulianDayFromEraYearMonthDay [K $date2 [set date2 {}]]] + + # Reconvert to seconds from the epoch in local time. + + set localSeconds [expr { ( ( ( wide([dict get $date2 julianDay]) + * $HoursPerDay + + wide([dict get $date2 hour]) ) + * $MinutesPerHour + + wide([dict get $date2 minute]) ) + * $SecondsPerMinute + + wide([dict get $date2 second]) ) + - $PosixEpochAsJulianSeconds }] + + # Determine the name and offset of the timezone + + set delta [expr { $localSeconds - $gmtSeconds }] + if { $delta <= 0 } { + set signum - + set delta [expr { - $delta }] + } else { + set signum + + } + set hh [::format %02d [expr { $delta / $SecondsPerHour }]] + set mm [::format %02d [expr { ($delta / $SecondsPerMinute ) + % $MinutesPerHour }]] + set ss [::format %02d [expr { $delta % $SecondsPerMinute }]] + + set zoneName $signum$hh$mm + if { $ss ne {00} } { + append zoneName $ss + } + + # Fix the dictionary + + dict set date localSeconds $localSeconds + dict set date tzOffset $delta + dict set date tzName $zoneName + return $date + +} + +#---------------------------------------------------------------------- +# +# SetupTimeZone -- +# +# Given the name or specification of a time zone, sets up +# its in-memory data. +# +# Parameters: +# tzname - Name of a time zone +# +# Results: +# Unless the time zone is ':localtime', sets the TZData array +# to contain the lookup table for local<->UTC conversion. +# Returns an error if the time zone cannot be parsed. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::SetupTimeZone { timezone } { + + variable TZData + variable MinutesPerHour + variable SecondsPerMinute + variable MINWIDE + + if {! [info exists TZData($timezone)] } { + if { $timezone eq {:localtime} } { + + # Nothing to do, we'll convert using the localtime function + + } elseif { [regexp {^([-+])(\d\d):?(\d\d)(?::?(\d\d))?} $timezone \ + -> s hh mm ss] } { + + # Make a fixed offset + + ::scan $hh %d hh + ::scan $mm %d mm + if { $ss eq {} } { + set ss 0 + } else { + ::scan $ss %d ss + } + set offset [expr { ( $hh * $MinutesPerHour + + $mm ) * $SecondsPerMinute + + $ss }] + if { $s eq {-} } { + set offset [expr { - $offset }] + } + set TZData($timezone) [list [list $MINWIDE $offset -1 $timezone]] + + } elseif { [string index $timezone 0] eq {:} } { + + # Convert using a time zone file + + if { + [catch { + LoadTimeZoneFile [string range $timezone 1 end] + }] + && [catch { + LoadZoneinfoFile [string range $timezone 1 end] + }] + } { + return -code error \ + -errorcode [list CLOCK badTimeZone $timezone] \ + "time zone \"$timezone\" not found" + } + + } elseif { ![catch {ParsePosixTimeZone $timezone} tzfields] } { + + # This looks like a POSIX time zone - try to process it + + if { [catch {ProcessPosixTimeZone $tzfields} data] } { + if { [lindex $::errorCode 0] eq {CLOCK} } { + return -code error -errorcode $::errorCode $data + } else { + error $tzfields $::errorInfo $::errorCode + } + } else { + set TZData($timezone) $data + } + + } else { + + # We couldn't parse this as a POSIX time zone. Try + # again with a time zone file - this time without a colon + + if { [catch { + LoadTimeZoneFile $timezone + } msg] } { + return -code error -errorcode $::errorCode $msg + } + set TZData($timezone) $TZData(:$timezone) + + } + } + + return +} + +#---------------------------------------------------------------------- +# +# GuessWindowsTimeZone -- +# +# Determines the system time zone on windows. +# +# Parameters: +# None. +# +# Results: +# Returns a time zone specifier that corresponds to the system +# time zone information found in the Registry. +# +# Bugs: +# Fixed dates for DST change are unimplemented at present, because +# no time zone information supplied with Windows actually uses +# them! +# +# On a Windows system where neither $env(TCL_TZ) nor $env(TZ) is +# specified, GuessWindowsTimeZone looks in the Registry for the +# system time zone information. It then attempts to find an entry +# in WinZoneInfo for a time zone that uses the same rules. If +# it finds one, it returns it; otherwise, it constructs a Posix-style +# time zone string and returns that. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::GuessWindowsTimeZone {} { + + variable WinZoneInfo + variable SecondsPerHour + variable SecondsPerMinute + variable MinutesPerHour + + # Dredge time zone information out of the registry + + set rpath HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\TimeZoneInformation + set data [list \ + [expr { -$SecondsPerMinute * [registry get $rpath Bias] }] \ + [expr { -$SecondsPerMinute \ + * [registry get $rpath StandardBias] }] \ + [expr { -$SecondsPerMinute \ + * [registry get $rpath DaylightBias] }]] + set stdtzi [registry get $rpath StandardStart] + foreach ind {0 2 14 4 6 8 10 12} { + binary scan $stdtzi @${ind}s val + lappend data $val + } + set daytzi [registry get $rpath DaylightStart] + foreach ind {0 2 14 4 6 8 10 12} { + binary scan $daytzi @${ind}s val + lappend data $val + } + + # Make up a Posix time zone specifier if we can't find one + + if { ! [dict exists $WinZoneInfo $data] } { + foreach { + bias stdBias dstBias + stdYear stdMonth stdDayOfWeek stdDayOfMonth + stdHour stdMinute stdSecond stdMillisec + dstYear dstMonth dstDayOfWeek dstDayOfMonth + dstHour dstMinute dstSecond dstMillisec + } $data break + set stdDelta [expr { $bias + $stdBias }] + set dstDelta [expr { $bias + $dstBias }] + if { $stdDelta <= 0 } { + set stdSignum + + set stdDelta [expr { - $stdDelta }] + } else { + set stdSignum - + } + set hh [::format %02d [expr { $stdDelta / $SecondsPerHour }]] + set mm [::format %02d [expr { ($stdDelta / $SecondsPerMinute ) + % $MinutesPerHour }]] + set ss [::format %02d [expr { $stdDelta % $SecondsPerMinute }]] + append tzname < $stdSignum $hh $mm > $stdSignum $hh : $mm : $ss + if { $stdMonth >= 0 } { + if { $dstDelta <= 0 } { + set dstSignum + + set dstDelta [expr { - $dstDelta }] + } else { + set dstSignum - + } + set hh [::format %02d [expr { $dstDelta / $SecondsPerHour }]] + set mm [::format %02d [expr { ($dstDelta / $SecondsPerMinute ) + % $MinutesPerHour }]] + set ss [::format %02d [expr { $dstDelta % $SecondsPerMinute }]] + append tzname < $dstSignum $hh $mm > $dstSignum $hh : $mm : $ss + if { $dstYear == 0 } { + append tzname ,M $dstMonth . $dstDayOfMonth . $dstDayOfWeek + } else { + # I have not been able to find any locale on which + # Windows converts time zone on a fixed day of the year, + # hence don't know how to interpret the fields. + # If someone can inform me, I'd be glad to code it up. + # For right now, we bail out in such a case. + return :localtime + } + append tzname / [::format %02d $dstHour] \ + : [::format %02d $dstMinute] \ + : [::format %02d $dstSecond] + if { $stdYear == 0 } { + append tzname ,M $stdMonth . $stdDayOfMonth . $stdDayOfWeek + } else { + # I have not been able to find any locale on which + # Windows converts time zone on a fixed day of the year, + # hence don't know how to interpret the fields. + # If someone can inform me, I'd be glad to code it up. + # For right now, we bail out in such a case. + return :localtime + } + append tzname / [::format %02d $stdHour] \ + : [::format %02d $stdMinute] \ + : [::format %02d $stdSecond] + } + dict set WinZoneInfo $data $tzname + } + + return [dict get $WinZoneInfo $data] + +} + +#---------------------------------------------------------------------- +# +# LoadTimeZoneFile -- +# +# Load the data file that specifies the conversion between a +# given time zone and Greenwich. +# +# Parameters: +# fileName -- Name of the file to load +# +# Results: +# None. +# +# Side effects: +# TZData(:fileName) contains the time zone data +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::LoadTimeZoneFile { fileName } { + variable DataDir + variable TZData + + # Since an unsafe interp uses the [clock] command in the master, + # this code is security sensitive. Make sure that the path name + # cannot escape the given directory. + + if { ![regexp {^[[:alpha:]_]+(?:/[[:alpha:]_]+)*$} $fileName] } { + return -code error \ + -errorcode [list CLOCK badTimeZone $:fileName] \ + "time zone \":$fileName\" not valid" + } + if { [catch { + source -encoding utf-8 [file join $DataDir $fileName] + }] } { + return -code error \ + -errorcode [list CLOCK badTimeZone :$fileName] \ + "time zone \":$fileName\" not found" + } +} + +#---------------------------------------------------------------------- +# +# LoadZoneinfoFile -- +# +# Loads a binary time zone information file in Olson format. +# +# Parameters: +# fileName - Path name of the file to load. +# +# Results: +# Returns an empty result normally; returns an error if no +# Olson file was found or the file was malformed in some way. +# +# Side effects: +# TZData(:fileName) contains the time zone data +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::LoadZoneinfoFile { fileName } { + + variable MINWIDE + variable TZData + variable ZoneinfoPaths + + # Since an unsafe interp uses the [clock] command in the master, + # this code is security sensitive. Make sure that the path name + # cannot escape the given directory. + + if { ![regexp {^[[:alpha:]_]+(?:/[[:alpha:]_]+)*$} $fileName] } { + return -code error \ + -errorcode [list CLOCK badTimeZone $:fileName] \ + "time zone \":$fileName\" not valid" + } + foreach d $ZoneinfoPaths { + set fname [file join $d $fileName] + if { [file readable $fname] && [file isfile $fname] } { + break + } + unset fname + } + if { ![info exists fname] } { + return -code error "$fileName not found" + } + + if { [file size $fname] > 262144 } { + return -code error "$fileName too big" + } + + # Suck in all the data from the file + + set f [open $fname r] + fconfigure $f -translation binary + set d [read $f] + close $f + + # The file begins with a magic number, sixteen reserved bytes, + # and then six 4-byte integers giving counts of fileds in the file. + + binary scan $d a4x16IIIIII magic nIsGMT mIsStd nLeap nTime nType nChar + set seek 44 + if { $magic != {TZif} } { + return -code error "$fileName not a time zone information file" + } + if { $nType > 255 } { + return -code error "$fileName contains too many time types" + } + if { $nLeap != 0 } { + return -code error "$fileName contains leap seconds" + } + + # Next come ${nTime} transition times, followed by ${nTime} time type + # codes. The type codes are unsigned 1-byte quantities. We insert an + # arbitrary start time in front of the transitions. + + binary scan $d @${seek}I${nTime}c${nTime} times tempCodes + incr seek [expr { 5 * $nTime }] + set times [linsert $times 0 $MINWIDE] + foreach c $tempCodes { + lappend codes [expr { $c & 0xff }] + } + set codes [linsert $codes 0 0] + + # Next come ${nType} time type descriptions, each of which has an + # offset (seconds east of GMT), a DST indicator, and an index into + # the abbreviation text. + + for { set i 0 } { $i < $nType } { incr i } { + binary scan $d @${seek}Icc gmtOff isDst abbrInd + lappend types [list $gmtOff $isDst $abbrInd] + incr seek 6 + } + + # Next come $nChar characters of time zone name abbreviations, + # which are null-terminated. + # We build them up into a dictionary indexed by character index, + # because that's what's in the indices above. + + binary scan $d @${seek}a${nChar} abbrs + incr seek ${nChar} + set abbrList [split $abbrs \0] + set i 0 + set abbrevs {} + foreach a $abbrList { + dict set abbrevs $i $a + incr i [expr { [string length $a] + 1 }] + } + + # The rest of the data in the file are not used at present. + # Package up a list of tuples, each of which contains transition time, + # seconds east of Greenwich, DST flag and time zone abbreviation. + + set r {} + set lastTime $MINWIDE + foreach t $times c $codes { + if { $t < $lastTime } { + return -code error "$fileName has times out of order" + } + set lastTime $t + foreach { gmtoff isDst abbrInd } [lindex $types $c] break + set abbrev [dict get $abbrevs $abbrInd] + lappend r [list $t $gmtoff $isDst $abbrev] + } + + set TZData(:$fileName) $r + +} + +#---------------------------------------------------------------------- +# +# ParsePosixTimeZone -- +# +# Parses the TZ environment variable in Posix form +# +# Parameters: +# tz Time zone specifier to be interpreted +# +# Results: +# Returns a dictionary whose values contain the various pieces of +# the time zone specification. +# +# Side effects: +# None. +# +# Errors: +# Throws an error if the syntax of the time zone is incorrect. +# +# The following keys are present in the dictionary: +# stdName - Name of the time zone when Daylight Saving Time +# is not in effect. +# stdSignum - Sign (+, -, or empty) of the offset from Greenwich +# to the given (non-DST) time zone. + and the empty +# string denote zones west of Greenwich, - denotes east +# of Greenwich; this is contrary to the ISO convention +# but follows Posix. +# stdHours - Hours part of the offset from Greenwich to the given +# (non-DST) time zone. +# stdMinutes - Minutes part of the offset from Greenwich to the +# given (non-DST) time zone. Empty denotes zero. +# stdSeconds - Seconds part of the offset from Greenwich to the +# given (non-DST) time zone. Empty denotes zero. +# dstName - Name of the time zone when DST is in effect, or the +# empty string if the time zone does not observe Daylight +# Saving Time. +# dstSignum, dstHours, dstMinutes, dstSeconds - +# Fields corresponding to stdSignum, stdHours, stdMinutes, +# stdSeconds for the Daylight Saving Time version of the +# time zone. If dstHours is empty, it is presumed to be 1. +# startDayOfYear - The ordinal number of the day of the year on which +# Daylight Saving Time begins. If this field is +# empty, then DST begins on a given month-week-day, +# as below. +# startJ - The letter J, or an empty string. If a J is present in +# this field, then startDayOfYear does not count February 29 +# even in leap years. +# startMonth - The number of the month in which Daylight Saving Time +# begins, supplied if startDayOfYear is empty. If both +# startDayOfYear and startMonth are empty, then US rules +# are presumed. +# startWeekOfMonth - The number of the week in the month in which +# Daylight Saving Time begins, in the range 1-5. +# 5 denotes the last week of the month even in a +# 4-week month. +# startDayOfWeek - The number of the day of the week (Sunday=0, +# Saturday=6) on which Daylight Saving Time begins. +# startHours - The hours part of the time of day at which Daylight +# Saving Time begins. An empty string is presumed to be 2. +# startMinutes - The minutes part of the time of day at which DST begins. +# An empty string is presumed zero. +# startSeconds - The seconds part of the time of day at which DST begins. +# An empty string is presumed zero. +# endDayOfYear, endJ, endMonth, endWeekOfMonth, endDayOfWeek, +# endHours, endMinutes, endSeconds - +# Specify the end of DST in the same way that the start* fields +# specify the beginning of DST. +# +# This procedure serves only to break the time specifier into fields. +# No attempt is made to canonicalize the fields or supply default values. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::ParsePosixTimeZone { tz } { + + if {[regexp -expanded -nocase -- { + ^ + # 1 - Standard time zone name + ([[:alpha:]]+ | <[-+[:alnum:]]+>) + # 2 - Standard time zone offset, signum + ([-+]?) + # 3 - Standard time zone offset, hours + ([[:digit:]]{1,2}) + (?: + # 4 - Standard time zone offset, minutes + : ([[:digit:]]{1,2}) + (?: + # 5 - Standard time zone offset, seconds + : ([[:digit:]]{1,2} ) + )? + )? + (?: + # 6 - DST time zone name + ([[:alpha:]]+ | <[-+[:alnum:]]+>) + (?: + (?: + # 7 - DST time zone offset, signum + ([-+]?) + # 8 - DST time zone offset, hours + ([[:digit:]]{1,2}) + (?: + # 9 - DST time zone offset, minutes + : ([[:digit:]]{1,2}) + (?: + # 10 - DST time zone offset, seconds + : ([[:digit:]]{1,2}) + )? + )? + )? + (?: + , + (?: + # 11 - Optional J in n and Jn form 12 - Day of year + ( J ? ) ( [[:digit:]]+ ) + | M + # 13 - Month number 14 - Week of month 15 - Day of week + ( [[:digit:]] + ) + [.] ( [[:digit:]] + ) + [.] ( [[:digit:]] + ) + ) + (?: + # 16 - Start time of DST - hours + / ( [[:digit:]]{1,2} ) + (?: + # 17 - Start time of DST - minutes + : ( [[:digit:]]{1,2} ) + (?: + # 18 - Start time of DST - seconds + : ( [[:digit:]]{1,2} ) + )? + )? + )? + , + (?: + # 19 - Optional J in n and Jn form 20 - Day of year + ( J ? ) ( [[:digit:]]+ ) + | M + # 21 - Month number 22 - Week of month 23 - Day of week + ( [[:digit:]] + ) + [.] ( [[:digit:]] + ) + [.] ( [[:digit:]] + ) + ) + (?: + # 24 - End time of DST - hours + / ( [[:digit:]]{1,2} ) + (?: + # 25 - End time of DST - minutes + : ( [[:digit:]]{1,2} ) + (?: + # 26 - End time of DST - seconds + : ( [[:digit:]]{1,2} ) + )? + )? + )? + )? + )? + )? + $ + } $tz -> x(stdName) x(stdSignum) x(stdHours) x(stdMinutes) x(stdSeconds) \ + x(dstName) x(dstSignum) x(dstHours) x(dstMinutes) x(dstSeconds) \ + x(startJ) x(startDayOfYear) \ + x(startMonth) x(startWeekOfMonth) x(startDayOfWeek) \ + x(startHours) x(startMinutes) x(startSeconds) \ + x(endJ) x(endDayOfYear) \ + x(endMonth) x(endWeekOfMonth) x(endDayOfWeek) \ + x(endHours) x(endMinutes) x(endSeconds)] } { + + # it's a good timezone + + return [array get x] + + } else { + + return -code error\ + -errorcode [list CLOCK badTimeZone $tz] \ + "unable to parse time zone specification \"$tz\"" + + } + +} + +#---------------------------------------------------------------------- +# +# ProcessPosixTimeZone -- +# +# Handle a Posix time zone after it's been broken out into +# fields. +# +# Parameters: +# z - Dictionary returned from 'ParsePosixTimeZone' +# +# Results: +# Returns time zone information for the 'TZData' array. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::ProcessPosixTimeZone { z } { + + variable MINWIDE + variable SecondsPerMinute + variable MinutesPerHour + variable TZData + + # Determine the standard time zone name and seconds east of Greenwich + + set stdName [dict get $z stdName] + if { [string index $stdName 0] eq {<} } { + set stdName [string range $stdName 1 end-1] + } + if { [dict get $z stdSignum] eq {-} } { + set stdSignum +1 + } else { + set stdSignum -1 + } + set stdHours [lindex [::scan [dict get $z stdHours] %d] 0] + if { [dict get $z stdMinutes] ne {} } { + set stdMinutes [lindex [::scan [dict get $z stdMinutes] %d] 0] + } else { + set stdMinutes 0 + } + if { [dict get $z stdSeconds] ne {} } { + set stdSeconds [lindex [::scan [dict get $z stdSeconds] %d] 0] + } else { + set stdSeconds 0 + } + set stdOffset [expr { ( ( $stdHours * $MinutesPerHour + $stdMinutes ) + * $SecondsPerMinute + $stdSeconds ) + * $stdSignum }] + set data [list [list $MINWIDE $stdOffset 0 $stdName]] + + # If there's no daylight zone, we're done + + set dstName [dict get $z dstName] + if { $dstName eq {} } { + return $data + } + if { [string index $dstName 0] eq {<} } { + set dstName [string range $dstName 1 end-1] + } + + # Determine the daylight name + + if { [dict get $z dstSignum] eq {-} } { + set dstSignum +1 + } else { + set dstSignum -1 + } + if { [dict get $z dstHours] eq {} } { + set dstOffset [expr { 3600 + $stdOffset }] + } else { + set dstHours [lindex [::scan [dict get $z dstHours] %d] 0] + if { [dict get $z dstMinutes] ne {} } { + set dstMinutes [lindex [::scan [dict get $z dstMinutes] %d] 0] + } else { + set dstMinutes 0 + } + if { [dict get $z dstSeconds] ne {} } { + set dstSeconds [lindex [::scan [dict get $z dstSeconds] %d] 0] + } else { + set dstSeconds 0 + } + set dstOffset [expr { ( ( $dstHours * $MinutesPerHour + $dstMinutes ) + * $SecondsPerMinute + $dstSeconds ) + * $dstSignum }] + } + + # Fill in defaults for US DST rules + + if { [dict get $z startDayOfYear] eq {} + && [dict get $z startMonth] eq {} } { + dict set z startMonth 4 + dict set z startWeekOfMonth 1 + dict set z startDayOfWeek 0 + dict set z startHours 2 + dict set z startMinutes 0 + dict set z startSeconds 0 + } + if { [dict get $z endDayOfYear] eq {} + && [dict get $z endMonth] eq {} } { + dict set z endMonth 10 + dict set z endWeekOfMonth 5 + dict set z endDayOfWeek 0 + dict set z endHours 2 + dict set z endMinutes 0 + dict set z endSeconds 0 + } + + # Put DST in effect in all years from 1916 to 2099. + + for { set y 1916 } { $y < 2099 } { incr y } { + set startTime [DeterminePosixDSTTime $z start $y] + incr startTime [expr { - wide($stdOffset) }] + set endTime [DeterminePosixDSTTime $z end $y] + incr endTime [expr { - wide($dstOffset) }] + if { $startTime < $endTime } { + lappend data \ + [list $startTime $dstOffset 1 $dstName] \ + [list $endTime $stdOffset 0 $stdName] + } else { + lappend data \ + [list $endTime $stdOffset 0 $stdName] \ + [list $startTime $dstOffset 1 $dstName] + } + } + + return $data + +} + +#---------------------------------------------------------------------- +# +# DeterminePosixDSTTime -- +# +# Determines the time that Daylight Saving Time starts or ends +# from a Posix time zone specification. +# +# Parameters: +# z - Time zone data returned from ParsePosixTimeZone. +# Missing fields are expected to be filled in with +# default values. +# bound - The word 'start' or 'end' +# y - The year for which the transition time is to be determined. +# +# Results: +# Returns the transition time as a count of seconds from +# the epoch. The time is relative to the wall clock, not UTC. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::DeterminePosixDSTTime { z bound y } { + + variable FEB_28 + variable PosixEpochAsJulianSeconds + variable SecondsPerDay + variable SecondsPerMinute + variable MinutesPerHour + + # Determine the start or end day of DST + + set date [dict create era CE year $y] + set doy [dict get $z ${bound}DayOfYear] + if { $doy ne {} } { + + # Time was specified as a day of the year + + if { [dict get $z ${bound}J] ne {} + && [IsGregorianLeapYear $y] + && ( $doy > $FEB_28 ) } { + incr doy + } + dict set date dayOfYear $doy + set date [GetJulianDayFromEraYearDay [K $date [set date {}]]] + } else { + + # Time was specified as a day of the week within a month + + dict set date month [dict get $z ${bound}Month] + dict set date dayOfWeekInMonth [dict get $z ${bound}WeekOfMonth] + set dow [dict get $z ${bound}DayOfWeek] + if { $dow >= 5 } { + set dow -1 + } + dict set date dayOfWeek $dow + set date [GetJulianDayFromEraYearMonthWeekDay [K $date [set date {}]]] + + } + + set jd [dict get $date julianDay] + set seconds [expr { wide($jd) * wide($SecondsPerDay) + - wide($PosixEpochAsJulianSeconds) }] + + set h [dict get $z ${bound}Hours] + if { $h eq {} } { + set h 2 + } else { + set h [lindex [::scan $h %d] 0] + } + set m [dict get $z ${bound}Minutes] + if { $m eq {} } { + set m 0 + } else { + set m [lindex [::scan $m %d] 0] + } + set s [dict get $z ${bound}Seconds] + if { $s eq {} } { + set s 0 + } else { + set s [lindex [::scan $s %d] 0] + } + set tod [expr { ( $h * $MinutesPerHour + $m ) * $SecondsPerMinute + $s }] + return [expr { $seconds + $tod }] + +} + +#---------------------------------------------------------------------- +# +# GetLocaleEra -- +# +# Given local time expressed in seconds from the Posix epoch, +# determine localized era and year within the era. +# +# Parameters: +# date - Dictionary that must contain the keys, 'localSeconds', +# whose value is expressed as the appropriate local time; +# and 'year', whose value is the Gregorian year. +# +# Results: +# Returns the dictionary, augmented with the keys, 'localeEra' +# and 'localeYear'. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::GetLocaleEra { date } { + + set etable [mc LOCALE_ERAS] + set index [BSearch $etable [dict get $date localSeconds]] + if { $index < 0 } { + dict set date localeEra \ + [::format %02d [expr { [dict get $date year] / 100 }]] + dict set date localeYear \ + [expr { [dict get $date year] % 100 }] + } else { + dict set date localeEra [lindex $etable $index 1] + dict set date localeYear [expr { [dict get $date year] + - [lindex $etable $index 2] }] + } + return $date + +} +#---------------------------------------------------------------------- +# +# GetJulianDay -- +# +# Given the seconds from the Posix epoch, derives the Julian +# day number. +# +# Parameters: +# date - Dictionary containing the date fields. On input, +# populated with a 'localSeconds' field that gives the +# nominal seconds from the epoch (in the local time zone, +# rather than UTC). +# +# Results: +# Returns the given dictionary, augmented by a 'julianDay' +# field that gives the Julian Day Number at noon of the current +# date. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::GetJulianDay { date } { + + variable PosixEpochAsJulianSeconds + variable SecondsPerDay + + set secs [dict get $date localSeconds] + + return [dict set date julianDay \ + [expr { ( $secs + $PosixEpochAsJulianSeconds ) + / $SecondsPerDay }]] + +} + +#---------------------------------------------------------------------- +# +# GetGregorianEraYearDay -- +# +# Given the time from the Posix epoch and the current time zone, +# develops the era, year, and day of year in the Gregorian calendar. +# +# Parameters: +# date - Dictionary containing the date fields. On input, populated +# with the 'julianDay' key whose value is the Julian Day Number. +# +# Results: +# Returns the given dictionary with the 'gregorian', 'era', +# 'year', and 'dayOfYear' populated. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::GetGregorianEraYearDay { date } { + + variable JD0Jan1CEGreg + variable JD0Jan1CEJul + variable DaysPer400Yr + variable DaysPerCentury + variable DaysPer4Yr + variable DaysPerYear + + set jday [dict get $date julianDay] + + set changeover [mc GREGORIAN_CHANGE_DATE] + + if { $jday >= $changeover } { + + # Gregorian date + + dict set date gregorian 1 + + # Calculate number of days since 1 January, 1 CE + + set day [expr { $jday - $JD0Jan1CEGreg - 1 }] + + # Calculate number of 400 year cycles + + set year 1 + set n [expr { $day / $DaysPer400Yr }] + incr year [expr { 400 * $n }] + set day [expr { $day % $DaysPer400Yr }] + + # Calculate number of centuries in the current cycle + + set n [expr { $day / $DaysPerCentury }] + set day [expr { $day % $DaysPerCentury }] + if { $n > 3 } { + set n 3 ;# 31 December 2000, for instance + incr day $DaysPerCentury ;# is last day of 400 year cycle + } + incr year [expr { 100 * $n }] + + } else { + + # Julian date + + dict set date gregorian 0 + + # Calculate days since 0 January, 1 CE Julian + + set day [expr { $jday - $JD0Jan1CEJul - 1 }] + set year 1 + + } + + # Calculate number of 4-year cycles in current century (or in + # the Common Era, if the calendar is Julian) + + set n [expr { $day / $DaysPer4Yr }] + set day [expr { $day % $DaysPer4Yr }] + incr year [expr { 4 * $n }] + + # Calculate number of years in current 4-year cycle + + set n [expr { $day / $DaysPerYear }] + set day [expr { $day % $DaysPerYear }] + if { $n > 3 } { + set n 3 ;# 31 December in a leap year + incr day $DaysPerYear + } + incr year $n + + # Calculate the era + + if { $year <= 0 } { + dict set date year [expr { 1 - $year }] + dict set date era BCE + } else { + dict set date year $year + dict set date era CE + } + + # Return day of the year + + dict set date dayOfYear [expr { $day + 1 }] + + return $date + +} + +#---------------------------------------------------------------------- +# +# GetMonthDay -- +# +# Given the ordinal number of the day within the year, determines +# month and day of month in the Gregorian calendar. +# +# Parameters: +# date - Dictionary containing the date fields. On input, populated +# with the 'era', 'gregorian', 'year' and 'dayOfYear' fields. +# +# Results: +# Returns the given dictionary with the 'month' and 'dayOfMonth' +# fields populated. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::GetMonthDay { date } { + + variable DaysInRomanMonthInCommonYear + variable DaysInRomanMonthInLeapYear + + set day [dict get $date dayOfYear] + if { [IsGregorianLeapYear $date] } { + set hath $DaysInRomanMonthInLeapYear + } else { + set hath $DaysInRomanMonthInCommonYear + } + set month 1 + foreach n $hath { + if { $day <= $n } { + break + } + incr month + incr day [expr { -$n }] + } + dict set date month $month + dict set date dayOfMonth $day + + return $date + +} + +#---------------------------------------------------------------------- +# +# GetYearWeekDay +# +# Given a julian day number, fiscal year, fiscal week, +# and day of week in the ISO8601 calendar. +# +# Parameters: +# +# date - Dictionary where the 'julianDay' field is populated. +# daysInFirstWeek - (Optional) Parameter giving the minimum number +# of days in the first week of a year. Default is 4. +# +# Results: +# Returns the given dictionary with values filled in for the +# three given keys. +# +# Side effects: +# None. +# +# Bugs: +# Since ISO8601 week numbering is defined only for the Gregorian +# calendar, dates on the Julian calendar or before the Common +# Era may yield unexpected results. In particular, the year of +# the Julian-to-Gregorian change may be up to three weeks short. +# The era is not managed separately, so if the Common Era begins +# (or the period Before the Common Era ends) with a partial week, +# the few days at the beginning or end of the era may show up +# as incorrectly belonging to the year zero. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::GetYearWeekDay { date + { keys { iso8601Year iso8601Week dayOfWeek } } } { + + set daysInFirstWeek 4 + set firstDayOfWeek 1 + + # Determine the calendar year of $j - $daysInFirstWeek + 1. + # Compute an upper bound of the fiscal year as being one year + # past the day on which the current week begins. Find the start + # of that year. + + set j [dict get $date julianDay] + set jd [expr { $j - $daysInFirstWeek + 1 }] + set date1 [GetGregorianEraYearDay [dict create julianDay $jd]] + switch -exact -- [dict get $date1 era] { + BCE { + dict set date1 fiscalYear [expr { [dict get $date1 year] - 1}] + } + CE { + dict set date1 fiscalYear [expr { [dict get $date1 year] + 1}] + } + } + dict unset date1 year + dict unset date1 dayOfYear + dict set date1 weekOfFiscalYear 1 + dict set date1 dayOfWeek $firstDayOfWeek + + set date1 [GetJulianDayFromEraYearWeekDay \ + [K $date1 [set date1 {}]] \ + $daysInFirstWeek \ + $firstDayOfWeek \ + { fiscalYear weekOfFiscalYear dayOfWeek }] + set startOfFiscalYear [dict get $date1 julianDay] + + # If we guessed high, move one year earlier. + + if { $j < $startOfFiscalYear } { + switch -exact -- [dict get $date1 era] { + BCE { + dict incr date1 fiscalYear + } + CE { + dict incr date1 fiscalYear -1 + } + } + set date1 [GetJulianDayFromEraYearWeekDay \ + [K $date1 [set date1 {}]] \ + $daysInFirstWeek \ + $firstDayOfWeek \ + {fiscalYear weekOfFiscalYear dayOfWeek }] + set startOfFiscalYear [dict get $date1 julianDay] + } + + # Get the week number and the day within the week + + set fiscalYear [dict get $date1 fiscalYear] + set dayOfFiscalYear [expr { $j - $startOfFiscalYear }] + set weekOfFiscalYear [expr { ( $dayOfFiscalYear / 7 ) + 1 }] + set dayOfWeek [expr { ( $dayOfFiscalYear + 1 ) % 7 }] + if { $dayOfWeek < $firstDayOfWeek } { + incr dayOfWeek 7 + } + + # Store the fiscal year, week, and day in the given slots in the + # given dictionary. + + foreach key $keys \ + value [list $fiscalYear $weekOfFiscalYear $dayOfWeek] { + dict set date $key $value + } + + return $date +} + +#---------------------------------------------------------------------- +# +# GetJulianDayFromEraYearWeekDay -- +# +# Finds the Julian Day Number corresponding to the given era, +# year, week and day. +# +# Parameters: +# date -- A dictionary populated with fields whose keys are given +# by the 'keys' parameter below, plus the 'era' field. +# daysInFirstWeek -- (Optional) The minimum number of days in +# the first week of the year. Default is 4. +# firstDayOfWeek -- (Optional) The ordinal number of the first +# day of the week. Default is 1 (Monday); +# 0 (Sunday) is an alternative. +# keys -- (Optional) Keys in the dictionary for looking up the +# fiscal year, fiscal week, and day of week. The +# default is { iso8601Year iso8601Week dayOfWeek }. +# +# Results: +# Returns the dictionary augmented with a 'julianDay' field +# that gives the Julian Day Number corresponding to the given +# date. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::GetJulianDayFromEraYearWeekDay { + date + { daysInFirstWeek 4 } + { firstDayOfWeek 1 } + { keys { iso8601Year iso8601Week dayOfWeek } } +} { + + foreach var { fiscalYear fiscalWeek dayOfWeek } key $keys { + set $var [dict get $date $key] + } + + # Find a day of the first week of the year. + + set date2 [dict create \ + era [dict get $date era] \ + year $fiscalYear \ + month 1 \ + dayOfMonth $daysInFirstWeek] + set date2 [GetJulianDayFromEraYearMonthDay [K $date2 [set date2 {}]]] + + # Find the Julian Day Number of the start of that week. + + set jd [WeekdayOnOrBefore $firstDayOfWeek [dict get $date2 julianDay]] + + # Add the required number of weeks and days + + dict set date julianDay \ + [expr { $jd + + ( 7 * ( $fiscalWeek - 1 ) ) + + $dayOfWeek - $firstDayOfWeek }] + + return $date + +} + +#---------------------------------------------------------------------- +# +# GetJulianDayFromEraYearMonthDay -- +# +# Given a year, month and day on the Gregorian calendar, determines +# the Julian Day Number beginning at noon on that date. +# +# Parameters: +# date -- A dictionary in which the 'era', 'year', 'month', and +# 'dayOfMonth' slots are populated. The calendar in use +# is determined by the date itself relative to +# [mc GREGORIAN_CHANGE_DATE] in the current locale. +# +# Results: +# Returns the given dictionary augmented with a 'julianDay' key +# whose value is the desired Julian Day Number, and a 'gregorian' +# key that specifies whether the calendar is Gregorian (1) or +# Julian (0). +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::GetJulianDayFromEraYearMonthDay { date } { + + variable JD0Jan1CEJul + variable JD0Jan1CEGreg + variable DaysInPriorMonthsInCommonYear + variable DaysInPriorMonthsInLeapYear + + # Get absolute year number from the civil year + + switch -exact [dict get $date era] { + BCE { + set year [expr { 1 - [dict get $date year] }] + } + CE { + set year [dict get $date year] + } + } + set ym1 [expr { $year - 1 }] + + # Try the Gregorian calendar first. + + dict set date gregorian 1 + set jd [expr { $JD0Jan1CEGreg + + [dict get $date dayOfMonth] + + ( [IsGregorianLeapYear $date] ? + [lindex $DaysInPriorMonthsInLeapYear \ + [expr { [dict get $date month] - 1}]] + : [lindex $DaysInPriorMonthsInCommonYear \ + [expr { [dict get $date month] - 1}]] ) + + ( 365 * $ym1 ) + + ( $ym1 / 4 ) + - ( $ym1 / 100 ) + + ( $ym1 / 400 ) }] + + # If the date is before the Gregorian change, use the Julian calendar. + + if { $jd < [mc GREGORIAN_CHANGE_DATE] } { + + dict set date gregorian 0 + set jd [expr { $JD0Jan1CEJul + + [dict get $date dayOfMonth] + + ( ( $year % 4 == 0 ) ? + [lindex $DaysInPriorMonthsInLeapYear \ + [expr { [dict get $date month] - 1}]] + : [lindex $DaysInPriorMonthsInCommonYear \ + [expr { [dict get $date month] - 1}]] ) + + ( 365 * $ym1 ) + + ( $ym1 / 4 ) }] + } + + dict set date julianDay $jd + return $date + +} + +#---------------------------------------------------------------------- +# +# GetJulianDayFromEraYearDay -- +# +# Given a year, month and day on the Gregorian calendar, determines +# the Julian Day Number beginning at noon on that date. +# +# Parameters: +# date -- A dictionary in which the 'era', 'year', and +# 'dayOfYear' slots are populated. The calendar in use +# is determined by the date itself relative to +# [mc GREGORIAN_CHANGE_DATE] in the current locale. +# +# Results: +# Returns the given dictionary augmented with a 'julianDay' key +# whose value is the desired Julian Day Number, and a 'gregorian' +# key that specifies whether the calendar is Gregorian (1) or +# Julian (0). +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::GetJulianDayFromEraYearDay { date } { + + variable JD0Jan1CEJul + variable JD0Jan1CEGreg + variable DaysInPriorMonthsInCommonYear + variable DaysInPriorMonthsInLeapYear + + # Get absolute year number from the civil year + + switch -exact [dict get $date era] { + BCE { + set year [expr { 1 - [dict get $date year] }] + } + CE { + set year [dict get $date year] + } + } + set ym1 [expr { $year - 1 }] + + # Try the Gregorian calendar first. + + dict set date gregorian 1 + set jd [expr { $JD0Jan1CEGreg + + [dict get $date dayOfYear] + + ( 365 * $ym1 ) + + ( $ym1 / 4 ) + - ( $ym1 / 100 ) + + ( $ym1 / 400 ) }] + + # If the date is before the Gregorian change, use the Julian calendar. + + if { $jd < [mc GREGORIAN_CHANGE_DATE] } { + dict set date gregorian 0 + set jd [expr { $JD0Jan1CEJul + + [dict get $date dayOfYear] + + ( 365 * $ym1 ) + + ( $ym1 / 4 ) }] + } + + dict set date julianDay $jd + return $date +} + +#---------------------------------------------------------------------- +# +# GetJulianDayFromEraYearMonthWeekDay -- +# +# Determines the Julian Day number corresponding to the nth +# given day-of-the-week in a given month. +# +# Parameters: +# date - Dictionary containing the keys, 'era', 'year', 'month' +# 'weekOfMonth', 'dayOfWeek', and 'dayOfWeekInMonth'. +# +# Results: +# Returns the given dictionary, augmented with a 'julianDay' key. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::GetJulianDayFromEraYearMonthWeekDay { date } { + + variable DaysPerWeek + + # Come up with a reference day; either the zeroeth day of the + # given month (dayOfWeekInMonth >= 0) or the seventh day of the + # following month (dayOfWeekInMonth < 0) + + set date2 $date + set week [dict get $date dayOfWeekInMonth] + if { $week >= 0 } { + dict set date2 dayOfMonth 0 + } else { + dict incr date2 month + dict set date2 dayOfMonth 7 + } + set date2 [GetJulianDayFromEraYearMonthDay [K $date2 [set date2 {}]]] + set wd0 [WeekdayOnOrBefore [dict get $date dayOfWeek] \ + [dict get $date2 julianDay]] + dict set date julianDay [expr { $wd0 + $DaysPerWeek * $week }] + return $date + +} + +#---------------------------------------------------------------------- +# +# IsGregorianLeapYear -- +# +# Determines whether a given date represents a leap year in the +# Gregorian calendar. +# +# Parameters: +# date -- The date to test. The fields, 'era', 'year' and 'gregorian' +# must be set. +# +# Results: +# Returns 1 if the year is a leap year, 0 otherwise. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::IsGregorianLeapYear { date } { + + switch -exact -- [dict get $date era] { + BCE { + set year [expr { 1 - [dict get $date year]}] + } + CE { + set year [dict get $date year] + } + } + if { $year % 4 != 0 } { + return 0 + } elseif { ![dict get $date gregorian] } { + return 1 + } elseif { $year % 400 == 0 } { + return 1 + } elseif { $year % 100 == 0 } { + return 0 + } else { + return 1 + } + +} + +#---------------------------------------------------------------------- +# +# WeekdayOnOrBefore -- +# +# Determine the nearest day of week (given by the 'weekday' +# parameter, Sunday==0) on or before a given Julian Day. +# +# Parameters: +# weekday -- Day of the week +# j -- Julian Day number +# +# Results: +# Returns the Julian Day Number of the desired date. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::WeekdayOnOrBefore { weekday j } { + + set k [expr { ( $weekday + 6 ) % 7 }] + return [expr { $j - ( $j - $k ) % 7 }] + +} + +#---------------------------------------------------------------------- +# +# BSearch -- +# +# Service procedure that does binary search in several places +# inside the 'clock' command. +# +# Parameters: +# list - List of lists, sorted in ascending order by the +# first elements +# key - Value to search for +# +# Results: +# Returns the index of the greatest element in $list that is less +# than or equal to $key. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::BSearch { list key } { + + if { $key < [lindex $list 0 0] } { + return -1 + } + + set l 0 + set u [expr { [llength $list] - 1 }] + + while { $l < $u } { + + # At this point, we know that + # $k >= [lindex $list $l 0] + # Either $u == [llength $list] or else $k < [lindex $list $u+1 0] + # We find the midpoint of the interval {l,u} rounded UP, compare + # against it, and set l or u to maintain the invariant. Note + # that the interval shrinks at each step, guaranteeing convergence. + + set m [expr { ( $l + $u + 1 ) / 2 }] + if { $key >= [lindex $list $m 0] } { + set l $m + } else { + set u [expr { $m - 1 }] + } + } + + return $l +} + +#---------------------------------------------------------------------- +# +# clock add -- +# +# Adds an offset to a given time. +# +# Syntax: +# clock add clockval ?count unit?... ?-option value? +# +# Parameters: +# clockval -- Starting time value +# count -- Amount of a unit of time to add +# unit -- Unit of time to add, must be one of: +# years year months month weeks week +# days day hours hour minutes minute +# seconds second +# +# Options: +# -gmt BOOLEAN +# (Deprecated) Flag synonymous with '-timezone :GMT' +# -timezone ZONE +# Name of the time zone in which calculations are to be done. +# -locale NAME +# Name of the locale in which calculations are to be done. +# Used to determine the Gregorian change date. +# +# Results: +# Returns the given time adjusted by the given offset(s) in +# order. +# +# Notes: +# It is possible that adding a number of months or years will adjust +# the day of the month as well. For instance, the time at +# one month after 31 January is either 28 or 29 February, because +# February has fewer than 31 days. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::add { clockval args } { + + if { [llength $args] % 2 != 0 } { + return -code error \ + -errorcode [list CLOCK wrongNumArgs] \ + "wrong \# args: should be\ + \"[lindex [info level 0] 0] clockval\ + ?number units?...\ + ?-gmt boolean? ?-locale LOCALE? ?-timezone ZONE?\"" + } + if { [catch { expr wide($clockval) } result] } { + return -code error $result + } + + set offsets {} + set gmt 0 + set locale C + set timezone [GetSystemTimeZone] + + foreach { a b } $args { + + if { [string is integer -strict $a] } { + + lappend offsets $a $b + + } else { + + switch -exact -- $a { + + -gmt { + set gmt $b + } + -locale { + set locale $b + } + -timezone { + set timezone $b + } + default { + return -code error \ + -errorcode [list CLOCK badSwitch $flag] \ + "bad switch \"$flag\",\ + must be -gmt, -locale or -timezone" + } + } + } + } + + # Check options for validity + + if { [info exists saw(-gmt)] && [info exists saw(-timezone)] } { + return -code error \ + -errorcode [list CLOCK gmtWithTimezone] \ + "cannot use -gmt and -timezone in same call" + } + if { [catch { expr { wide($clockval) } } result] } { + return -code error \ + "expected integer but got \"$clockval\"" + } + if { ![string is boolean $gmt] } { + return -code error \ + "expected boolean value but got \"$gmt\"" + } else { + if { $gmt } { + set timezone :GMT + } + } + + EnterLocale $locale oldLocale + + set status [catch { + + foreach { quantity unit } $offsets { + + switch -exact -- $unit { + + years - year { + set clockval \ + [AddMonths [expr { 12 * $quantity }] \ + $clockval $timezone] + } + months - month { + set clockval [AddMonths $quantity $clockval $timezone] + } + + weeks - week { + set clockval [AddDays [expr { 7 * $quantity }] \ + $clockval $timezone] + } + days - day { + set clockval [AddDays $quantity $clockval $timezone] + } + + hours - hour { + set clockval [expr { 3600 * $quantity + $clockval }] + } + minutes - minute { + set clockval [expr { 60 * $quantity + $clockval }] + } + seconds - second { + set clockval [expr { $quantity + $clockval }] + } + + default { + error "unknown unit \"$unit\", must be \ + years, months, weeks, days, hours, minutes or seconds" \ + "unknown unit \"$unit\", must be \ + years, months, weeks, days, hours, minutes or seconds" \ + [list CLOCK badUnit $unit] + } + } + } + } result] + + # Restore the locale + + if { [info exists oldLocale] } { + mclocale $oldLocale + } + + if { $status == 1 } { + if { [lindex $::errorCode 0] eq {CLOCK} } { + return -code error -errorcode $::errorCode $result + } else { + error $result $::errorInfo $::errorCode + } + } else { + return $clockval + } + +} + +#---------------------------------------------------------------------- +# +# AddMonths -- +# +# Add a given number of months to a given clock value in a given +# time zone. +# +# Parameters: +# months - Number of months to add (may be negative) +# clockval - Seconds since the epoch before the operation +# timezone - Time zone in which the operation is to be performed +# +# Results: +# Returns the new clock value as a number of seconds since +# the epoch. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::AddMonths { months clockval timezone } { + + variable DaysInRomanMonthInCommonYear + variable DaysInRomanMonthInLeapYear + variable PosixEpochAsJulianSeconds + variable SecondsPerDay + + # Convert the time to year, month, day, and fraction of day. + + set date [GetMonthDay \ + [GetGregorianEraYearDay \ + [GetJulianDay \ + [ConvertUTCToLocal \ + [dict create seconds $clockval] \ + $timezone]]]] + dict set date secondOfDay [expr { [dict get $date localSeconds] + % $SecondsPerDay }] + dict set date tzName $timezone + + # Add the requisite number of months + + set m [dict get $date month] + incr m $months + incr m -1 + set delta [expr { $m / 12 }] + set mm [expr { $m % 12 }] + dict set date month [expr { $mm + 1 }] + dict incr date year $delta + + # If the date doesn't exist in the current month, repair it + + if { [IsGregorianLeapYear $date] } { + set hath [lindex $DaysInRomanMonthInLeapYear $mm] + } else { + set hath [lindex $DaysInRomanMonthInCommonYear $mm] + } + if { [dict get $date dayOfMonth] > $hath } { + dict set date dayOfMonth $hath + } + + # Reconvert to a number of seconds + + set date [GetJulianDayFromEraYearMonthDay \ + [K $date [set date {}]]] + dict set date localSeconds \ + [expr { -$PosixEpochAsJulianSeconds + + ( $SecondsPerDay * wide([dict get $date julianDay]) ) + + [dict get $date secondOfDay] }] + set date [ConvertLocalToUTC [K $date [set date {}]]] + + return [dict get $date seconds] + +} + +#---------------------------------------------------------------------- +# +# AddDays -- +# +# Add a given number of days to a given clock value in a given +# time zone. +# +# Parameters: +# days - Number of days to add (may be negative) +# clockval - Seconds since the epoch before the operation +# timezone - Time zone in which the operation is to be performed +# +# Results: +# Returns the new clock value as a number of seconds since +# the epoch. +# +# Side effects: +# None. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::AddDays { days clockval timezone } { + + variable PosixEpochAsJulianSeconds + variable SecondsPerDay + + # Convert the time to Julian Day + + set date [GetJulianDay \ + [ConvertUTCToLocal \ + [dict create seconds $clockval] \ + $timezone]] + dict set date secondOfDay [expr { [dict get $date localSeconds] + % $SecondsPerDay }] + dict set date tzName $timezone + + # Add the requisite number of days + + dict incr date julianDay $days + + # Reconvert to a number of seconds + + dict set date localSeconds \ + [expr { -$PosixEpochAsJulianSeconds + + ( $SecondsPerDay * wide([dict get $date julianDay]) ) + + [dict get $date secondOfDay] }] + set date [ConvertLocalToUTC [K $date [set date {}]]] + + return [dict get $date seconds] + +} + +#---------------------------------------------------------------------- +# +# ClearCaches -- +# +# Clears all caches to reclaim the memory used in [clock] +# +# Parameters: +# None. +# +# Results: +# None. +# +# Side effects: +# Caches are cleared. +# +#---------------------------------------------------------------------- + +proc ::tcl::clock::ClearCaches {} { + + variable LocaleNumeralCache + variable McLoaded + variable CachedSystemTimeZone + variable TZData + + foreach p [info procs [namespace current]::scanproc'*] { + rename $p {} + } + + set LocaleNumeralCache {} + set McLoaded {} + catch {unset CachedSystemTimeZone} + array unset TZData + +} diff --git a/library/init.tcl b/library/init.tcl index 21b3377..761aa4a 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,11 +3,12 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.63 2004/06/16 21:20:42 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.64 2004/08/18 19:59:00 kennykb Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 Scriptics Corporation. +# Copyright (c) 2004 by Kevin B. Kenny. All rights reserved. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -743,3 +744,38 @@ proc tcl::CopyDirectory {action src dest} { } return } + +# Set up the 'clock' ensemble + +if { ![interp issafe] } { + + namespace eval ::tcl::clock \ + [list variable TclLibDir [file dirname [info script]]] + + namespace eval ::tcl::clock { + namespace ensemble create -command ::clock \ + -subcommands { + add clicks format + microseconds milliseconds + scan seconds + } + + # Auto-loading stub for 'clock.tcl' + + proc add args { + variable TclLibDir + source -encoding utf-8 [file join $TclLibDir clock.tcl] + return [uplevel 1 [info level 0]] + } + proc format args { + variable TclLibDir + source -encoding utf-8 [file join $TclLibDir clock.tcl] + return [uplevel 1 [info level 0]] + } + proc scan args { + variable TclLibDir + source -encoding utf-8 [file join $TclLibDir clock.tcl] + return [uplevel 1 [info level 0]] + } + } +} diff --git a/library/msgs/af.msg b/library/msgs/af.msg new file mode 100755 index 0000000..0892615 --- /dev/null +++ b/library/msgs/af.msg @@ -0,0 +1,49 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset af DAYS_OF_WEEK_ABBREV [list \ + "So"\ + "Ma"\ + "Di"\ + "Wo"\ + "Do"\ + "Vr"\ + "Sa"] + ::msgcat::mcset af DAYS_OF_WEEK_FULL [list \ + "Sondag"\ + "Maandag"\ + "Dinsdag"\ + "Woensdag"\ + "Donderdag"\ + "Vrydag"\ + "Saterdag"] + ::msgcat::mcset af MONTHS_ABBREV [list \ + "Jan"\ + "Feb"\ + "Mar"\ + "Apr"\ + "Mei"\ + "Jun"\ + "Jul"\ + "Aug"\ + "Sep"\ + "Okt"\ + "Nov"\ + "Des"\ + ""] + ::msgcat::mcset af MONTHS_FULL [list \ + "Januarie"\ + "Februarie"\ + "Maart"\ + "April"\ + "Mei"\ + "Junie"\ + "Julie"\ + "Augustus"\ + "September"\ + "Oktober"\ + "November"\ + "Desember"\ + ""] + ::msgcat::mcset af AM "VM" + ::msgcat::mcset af PM "NM" +} diff --git a/library/msgs/af_ZA.msg b/library/msgs/af_ZA.msg new file mode 100755 index 0000000..fef48ad --- /dev/null +++ b/library/msgs/af_ZA.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset af_ZA DATE_FORMAT "%d %B %Y" + ::msgcat::mcset af_ZA TIME_FORMAT_12 "%l:%M:%S %P" + ::msgcat::mcset af_ZA DATE_TIME_FORMAT "%d %B %Y %l:%M:%S %P %z" +} diff --git a/library/msgs/ar.msg b/library/msgs/ar.msg new file mode 100755 index 0000000..257157f --- /dev/null +++ b/library/msgs/ar.msg @@ -0,0 +1,54 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ar DAYS_OF_WEEK_ABBREV [list \ + "\u062d"\ + "\u0646"\ + "\u062b"\ + "\u0631"\ + "\u062e"\ + "\u062c"\ + "\u0633"] + ::msgcat::mcset ar DAYS_OF_WEEK_FULL [list \ + "\u0627\u0644\u0623\u062d\u062f"\ + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646"\ + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621"\ + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621"\ + "\u0627\u0644\u062e\u0645\u064a\u0633"\ + "\u0627\u0644\u062c\u0645\u0639\u0629"\ + "\u0627\u0644\u0633\u0628\u062a"] + ::msgcat::mcset ar MONTHS_ABBREV [list \ + "\u064a\u0646\u0627"\ + "\u0641\u0628\u0631"\ + "\u0645\u0627\u0631"\ + "\u0623\u0628\u0631"\ + "\u0645\u0627\u064a"\ + "\u064a\u0648\u0646"\ + "\u064a\u0648\u0644"\ + "\u0623\u063a\u0633"\ + "\u0633\u0628\u062a"\ + "\u0623\u0643\u062a"\ + "\u0646\u0648\u0641"\ + "\u062f\u064a\u0633"\ + ""] + ::msgcat::mcset ar MONTHS_FULL [list \ + "\u064a\u0646\u0627\u064a\u0631"\ + "\u0641\u0628\u0631\u0627\u064a\u0631"\ + "\u0645\u0627\u0631\u0633"\ + "\u0623\u0628\u0631\u064a\u0644"\ + "\u0645\u0627\u064a\u0648"\ + "\u064a\u0648\u0646\u064a\u0648"\ + "\u064a\u0648\u0644\u064a\u0648"\ + "\u0623\u063a\u0633\u0637\u0633"\ + "\u0633\u0628\u062a\u0645\u0628\u0631"\ + "\u0623\u0643\u062a\u0648\u0628\u0631"\ + "\u0646\u0648\u0641\u0645\u0628\u0631"\ + "\u062f\u064a\u0633\u0645\u0628\u0631"\ + ""] + ::msgcat::mcset ar BCE "\u0642.\u0645" + ::msgcat::mcset ar CE "\u0645" + ::msgcat::mcset ar AM "\u0635" + ::msgcat::mcset ar PM "\u0645" + ::msgcat::mcset ar DATE_FORMAT "%d/%m/%Y" + ::msgcat::mcset ar TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset ar DATE_TIME_FORMAT "%d/%m/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/ar_IN.msg b/library/msgs/ar_IN.msg new file mode 100755 index 0000000..185e49c --- /dev/null +++ b/library/msgs/ar_IN.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ar_IN DATE_FORMAT "%A %d %B %Y" + ::msgcat::mcset ar_IN TIME_FORMAT_12 "%I:%M:%S %z" + ::msgcat::mcset ar_IN DATE_TIME_FORMAT "%A %d %B %Y %I:%M:%S %z %z" +} diff --git a/library/msgs/ar_JO.msg b/library/msgs/ar_JO.msg new file mode 100755 index 0000000..0f5e269 --- /dev/null +++ b/library/msgs/ar_JO.msg @@ -0,0 +1,39 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ar_JO DAYS_OF_WEEK_ABBREV [list \ + "\u0627\u0644\u0623\u062d\u062f"\ + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646"\ + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621"\ + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621"\ + "\u0627\u0644\u062e\u0645\u064a\u0633"\ + "\u0627\u0644\u062c\u0645\u0639\u0629"\ + "\u0627\u0644\u0633\u0628\u062a"] + ::msgcat::mcset ar_JO MONTHS_ABBREV [list \ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a"\ + "\u0634\u0628\u0627\u0637"\ + "\u0622\u0630\u0627\u0631"\ + "\u0646\u064a\u0633\u0627\u0646"\ + "\u0646\u0648\u0627\u0631"\ + "\u062d\u0632\u064a\u0631\u0627\u0646"\ + "\u062a\u0645\u0648\u0632"\ + "\u0622\u0628"\ + "\u0623\u064a\u0644\u0648\u0644"\ + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644"\ + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a"\ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"\ + ""] + ::msgcat::mcset ar_JO MONTHS_FULL [list \ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a"\ + "\u0634\u0628\u0627\u0637"\ + "\u0622\u0630\u0627\u0631"\ + "\u0646\u064a\u0633\u0627\u0646"\ + "\u0646\u0648\u0627\u0631"\ + "\u062d\u0632\u064a\u0631\u0627\u0646"\ + "\u062a\u0645\u0648\u0632"\ + "\u0622\u0628"\ + "\u0623\u064a\u0644\u0648\u0644"\ + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644"\ + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a"\ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"\ + ""] +} diff --git a/library/msgs/ar_LB.msg b/library/msgs/ar_LB.msg new file mode 100755 index 0000000..e62acd3 --- /dev/null +++ b/library/msgs/ar_LB.msg @@ -0,0 +1,39 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ar_LB DAYS_OF_WEEK_ABBREV [list \ + "\u0627\u0644\u0623\u062d\u062f"\ + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646"\ + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621"\ + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621"\ + "\u0627\u0644\u062e\u0645\u064a\u0633"\ + "\u0627\u0644\u062c\u0645\u0639\u0629"\ + "\u0627\u0644\u0633\u0628\u062a"] + ::msgcat::mcset ar_LB MONTHS_ABBREV [list \ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a"\ + "\u0634\u0628\u0627\u0637"\ + "\u0622\u0630\u0627\u0631"\ + "\u0646\u064a\u0633\u0627\u0646"\ + "\u0646\u0648\u0627\u0631"\ + "\u062d\u0632\u064a\u0631\u0627\u0646"\ + "\u062a\u0645\u0648\u0632"\ + "\u0622\u0628"\ + "\u0623\u064a\u0644\u0648\u0644"\ + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644"\ + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a"\ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"\ + ""] + ::msgcat::mcset ar_LB MONTHS_FULL [list \ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a"\ + "\u0634\u0628\u0627\u0637"\ + "\u0622\u0630\u0627\u0631"\ + "\u0646\u064a\u0633\u0627\u0646"\ + "\u0646\u0648\u0627\u0631"\ + "\u062d\u0632\u064a\u0631\u0627\u0646"\ + "\u062a\u0645\u0648\u0632"\ + "\u0622\u0628"\ + "\u0623\u064a\u0644\u0648\u0644"\ + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644"\ + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a"\ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"\ + ""] +} diff --git a/library/msgs/ar_SY.msg b/library/msgs/ar_SY.msg new file mode 100755 index 0000000..d5e1c87 --- /dev/null +++ b/library/msgs/ar_SY.msg @@ -0,0 +1,39 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ar_SY DAYS_OF_WEEK_ABBREV [list \ + "\u0627\u0644\u0623\u062d\u062f"\ + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646"\ + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621"\ + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621"\ + "\u0627\u0644\u062e\u0645\u064a\u0633"\ + "\u0627\u0644\u062c\u0645\u0639\u0629"\ + "\u0627\u0644\u0633\u0628\u062a"] + ::msgcat::mcset ar_SY MONTHS_ABBREV [list \ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a"\ + "\u0634\u0628\u0627\u0637"\ + "\u0622\u0630\u0627\u0631"\ + "\u0646\u064a\u0633\u0627\u0646"\ + "\u0646\u0648\u0627\u0631"\ + "\u062d\u0632\u064a\u0631\u0627\u0646"\ + "\u062a\u0645\u0648\u0632"\ + "\u0622\u0628"\ + "\u0623\u064a\u0644\u0648\u0644"\ + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644"\ + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a"\ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"\ + ""] + ::msgcat::mcset ar_SY MONTHS_FULL [list \ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a"\ + "\u0634\u0628\u0627\u0637"\ + "\u0622\u0630\u0627\u0631"\ + "\u0646\u064a\u0633\u0627\u0646"\ + "\u0646\u0648\u0627\u0631\u0627\u0646"\ + "\u062d\u0632\u064a\u0631"\ + "\u062a\u0645\u0648\u0632"\ + "\u0622\u0628"\ + "\u0623\u064a\u0644\u0648\u0644"\ + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644"\ + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a"\ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"\ + ""] +} diff --git a/library/msgs/be.msg b/library/msgs/be.msg new file mode 100755 index 0000000..379a1d7 --- /dev/null +++ b/library/msgs/be.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset be DAYS_OF_WEEK_ABBREV [list \ + "\u043d\u0434"\ + "\u043f\u043d"\ + "\u0430\u0442"\ + "\u0441\u0440"\ + "\u0447\u0446"\ + "\u043f\u0442"\ + "\u0441\u0431"] + ::msgcat::mcset be DAYS_OF_WEEK_FULL [list \ + "\u043d\u044f\u0434\u0437\u0435\u043b\u044f"\ + "\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a"\ + "\u0430\u045e\u0442\u043e\u0440\u0430\u043a"\ + "\u0441\u0435\u0440\u0430\u0434\u0430"\ + "\u0447\u0430\u0446\u0432\u0435\u0440"\ + "\u043f\u044f\u0442\u043d\u0456\u0446\u0430"\ + "\u0441\u0443\u0431\u043e\u0442\u0430"] + ::msgcat::mcset be MONTHS_ABBREV [list \ + "\u0441\u0442\u0434"\ + "\u043b\u044e\u0442"\ + "\u0441\u043a\u0432"\ + "\u043a\u0440\u0441"\ + "\u043c\u0430\u0439"\ + "\u0447\u0440\u0432"\ + "\u043b\u043f\u043d"\ + "\u0436\u043d\u0432"\ + "\u0432\u0440\u0441"\ + "\u043a\u0441\u0442"\ + "\u043b\u0441\u0442"\ + "\u0441\u043d\u0436"\ + ""] + ::msgcat::mcset be MONTHS_FULL [list \ + "\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f"\ + "\u043b\u044e\u0442\u0430\u0433\u0430"\ + "\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430"\ + "\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430"\ + "\u043c\u0430\u044f"\ + "\u0447\u0440\u0432\u0435\u043d\u044f"\ + "\u043b\u0456\u043f\u0435\u043d\u044f"\ + "\u0436\u043d\u0456\u045e\u043d\u044f"\ + "\u0432\u0435\u0440\u0430\u0441\u043d\u044f"\ + "\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430"\ + "\u043b\u0438\u0441\u0442\u0430\u043f\u0430\u0434\u0430"\ + "\u0441\u043d\u0435\u0436\u043d\u044f"\ + ""] + ::msgcat::mcset be BCE "\u0434\u0430 \u043d.\u0435." + ::msgcat::mcset be CE "\u043d.\u0435." + ::msgcat::mcset be DATE_FORMAT "%e.%m.%Y" + ::msgcat::mcset be TIME_FORMAT "%k.%M.%S" + ::msgcat::mcset be DATE_TIME_FORMAT "%e.%m.%Y %k.%M.%S %z" +} diff --git a/library/msgs/bg.msg b/library/msgs/bg.msg new file mode 100755 index 0000000..ff17759 --- /dev/null +++ b/library/msgs/bg.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset bg DAYS_OF_WEEK_ABBREV [list \ + "\u041d\u0434"\ + "\u041f\u043d"\ + "\u0412\u0442"\ + "\u0421\u0440"\ + "\u0427\u0442"\ + "\u041f\u0442"\ + "\u0421\u0431"] + ::msgcat::mcset bg DAYS_OF_WEEK_FULL [list \ + "\u041d\u0435\u0434\u0435\u043b\u044f"\ + "\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a"\ + "\u0412\u0442\u043e\u0440\u043d\u0438\u043a"\ + "\u0421\u0440\u044f\u0434\u0430"\ + "\u0427\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a"\ + "\u041f\u0435\u0442\u044a\u043a"\ + "\u0421\u044a\u0431\u043e\u0442\u0430"] + ::msgcat::mcset bg MONTHS_ABBREV [list \ + "I"\ + "II"\ + "III"\ + "IV"\ + "V"\ + "VI"\ + "VII"\ + "VIII"\ + "IX"\ + "X"\ + "XI"\ + "XII"\ + ""] + ::msgcat::mcset bg MONTHS_FULL [list \ + "\u042f\u043d\u0443\u0430\u0440\u0438"\ + "\u0424\u0435\u0432\u0440\u0443\u0430\u0440\u0438"\ + "\u041c\u0430\u0440\u0442"\ + "\u0410\u043f\u0440\u0438\u043b"\ + "\u041c\u0430\u0439"\ + "\u042e\u043d\u0438"\ + "\u042e\u043b\u0438"\ + "\u0410\u0432\u0433\u0443\u0441\u0442"\ + "\u0421\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438"\ + "\u041e\u043a\u0442\u043e\u043c\u0432\u0440\u0438"\ + "\u041d\u043e\u0435\u043c\u0432\u0440\u0438"\ + "\u0414\u0435\u043a\u0435\u043c\u0432\u0440\u0438"\ + ""] + ::msgcat::mcset bg BCE "\u043f\u0440.\u043d.\u0435." + ::msgcat::mcset bg CE "\u043d.\u0435." + ::msgcat::mcset bg DATE_FORMAT "%Y-%m-%e" + ::msgcat::mcset bg TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset bg DATE_TIME_FORMAT "%Y-%m-%e %k:%M:%S %z" +} diff --git a/library/msgs/bn.msg b/library/msgs/bn.msg new file mode 100755 index 0000000..664b9d8 --- /dev/null +++ b/library/msgs/bn.msg @@ -0,0 +1,49 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset bn DAYS_OF_WEEK_ABBREV [list \ + "\u09b0\u09ac\u09bf"\ + "\u09b8\u09cb\u09ae"\ + "\u09ae\u0999\u0997\u09b2"\ + "\u09ac\u09c1\u09a7"\ + "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf"\ + "\u09b6\u09c1\u0995\u09cd\u09b0"\ + "\u09b6\u09a8\u09bf"] + ::msgcat::mcset bn DAYS_OF_WEEK_FULL [list \ + "\u09b0\u09ac\u09bf\u09ac\u09be\u09b0"\ + "\u09b8\u09cb\u09ae\u09ac\u09be\u09b0"\ + "\u09ae\u0999\u0997\u09b2\u09ac\u09be\u09b0"\ + "\u09ac\u09c1\u09a7\u09ac\u09be\u09b0"\ + "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0"\ + "\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0"\ + "\u09b6\u09a8\u09bf\u09ac\u09be\u09b0"] + ::msgcat::mcset bn MONTHS_ABBREV [list \ + "\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09c0"\ + "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09c0"\ + "\u09ae\u09be\u09b0\u09cd\u099a"\ + "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2"\ + "\u09ae\u09c7"\ + "\u099c\u09c1\u09a8"\ + "\u099c\u09c1\u09b2\u09be\u0987"\ + "\u0986\u0997\u09b8\u09cd\u099f"\ + "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0"\ + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0"\ + "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0"\ + "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0"\ + ""] + ::msgcat::mcset bn MONTHS_FULL [list \ + "\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09c0"\ + "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09c0"\ + "\u09ae\u09be\u09b0\u09cd\u099a"\ + "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2"\ + "\u09ae\u09c7"\ + "\u099c\u09c1\u09a8"\ + "\u099c\u09c1\u09b2\u09be\u0987"\ + "\u0986\u0997\u09b8\u09cd\u099f"\ + "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0"\ + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0"\ + "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0"\ + "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0"\ + ""] + ::msgcat::mcset bn AM "\u09aa\u09c2\u09b0\u09cd\u09ac\u09be\u09b9\u09cd\u09a3" + ::msgcat::mcset bn PM "\u0985\u09aa\u09b0\u09be\u09b9\u09cd\u09a3" +} diff --git a/library/msgs/bn_IN.msg b/library/msgs/bn_IN.msg new file mode 100755 index 0000000..28c000f --- /dev/null +++ b/library/msgs/bn_IN.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset bn_IN DATE_FORMAT "%A %d %b %Y" + ::msgcat::mcset bn_IN TIME_FORMAT_12 "%I:%M:%S %z" + ::msgcat::mcset bn_IN DATE_TIME_FORMAT "%A %d %b %Y %I:%M:%S %z %z" +} diff --git a/library/msgs/ca.msg b/library/msgs/ca.msg new file mode 100755 index 0000000..36c9772 --- /dev/null +++ b/library/msgs/ca.msg @@ -0,0 +1,50 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ca DAYS_OF_WEEK_ABBREV [list \ + "dg."\ + "dl."\ + "dt."\ + "dc."\ + "dj."\ + "dv."\ + "ds."] + ::msgcat::mcset ca DAYS_OF_WEEK_FULL [list \ + "diumenge"\ + "dilluns"\ + "dimarts"\ + "dimecres"\ + "dijous"\ + "divendres"\ + "dissabte"] + ::msgcat::mcset ca MONTHS_ABBREV [list \ + "gen."\ + "feb."\ + "mar\u00e7"\ + "abr."\ + "maig"\ + "juny"\ + "jul."\ + "ag."\ + "set."\ + "oct."\ + "nov."\ + "des."\ + ""] + ::msgcat::mcset ca MONTHS_FULL [list \ + "gener"\ + "febrer"\ + "mar\u00e7"\ + "abril"\ + "maig"\ + "juny"\ + "juliol"\ + "agost"\ + "setembre"\ + "octubre"\ + "novembre"\ + "desembre"\ + ""] + ::msgcat::mcset ca DATE_FORMAT "%d/%m/%Y" + ::msgcat::mcset ca TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset ca DATE_TIME_FORMAT "%d/%m/%Y %H:%M:%S %z" +} diff --git a/library/msgs/cs.msg b/library/msgs/cs.msg new file mode 100755 index 0000000..8db8bdd --- /dev/null +++ b/library/msgs/cs.msg @@ -0,0 +1,54 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset cs DAYS_OF_WEEK_ABBREV [list \ + "Ne"\ + "Po"\ + "\u00dat"\ + "St"\ + "\u010ct"\ + "P\u00e1"\ + "So"] + ::msgcat::mcset cs DAYS_OF_WEEK_FULL [list \ + "Ned\u011ble"\ + "Pond\u011bl\u00ed"\ + "\u00dater\u00fd"\ + "St\u0159eda"\ + "\u010ctvrtek"\ + "P\u00e1tek"\ + "Sobota"] + ::msgcat::mcset cs MONTHS_ABBREV [list \ + "I"\ + "II"\ + "III"\ + "IV"\ + "V"\ + "VI"\ + "VII"\ + "VIII"\ + "IX"\ + "X"\ + "XI"\ + "XII"\ + ""] + ::msgcat::mcset cs MONTHS_FULL [list \ + "leden"\ + "\u00fanor"\ + "b\u0159ezen"\ + "duben"\ + "kv\u011bten"\ + "\u010derven"\ + "\u010dervenec"\ + "srpen"\ + "z\u00e1\u0159\u00ed"\ + "\u0159\u00edjen"\ + "listopad"\ + "prosinec"\ + ""] + ::msgcat::mcset cs BCE "p\u0159.Kr." + ::msgcat::mcset cs CE "po Kr." + ::msgcat::mcset cs AM "dop." + ::msgcat::mcset cs PM "odp." + ::msgcat::mcset cs DATE_FORMAT "%e.%m.%Y" + ::msgcat::mcset cs TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset cs DATE_TIME_FORMAT "%e.%m.%Y %k:%M:%S %z" +} diff --git a/library/msgs/da.msg b/library/msgs/da.msg new file mode 100755 index 0000000..e4fec7f --- /dev/null +++ b/library/msgs/da.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset da DAYS_OF_WEEK_ABBREV [list \ + "s\u00f8"\ + "ma"\ + "ti"\ + "on"\ + "to"\ + "fr"\ + "l\u00f8"] + ::msgcat::mcset da DAYS_OF_WEEK_FULL [list \ + "s\u00f8ndag"\ + "mandag"\ + "tirsdag"\ + "onsdag"\ + "torsdag"\ + "fredag"\ + "l\u00f8rdag"] + ::msgcat::mcset da MONTHS_ABBREV [list \ + "jan"\ + "feb"\ + "mar"\ + "apr"\ + "maj"\ + "jun"\ + "jul"\ + "aug"\ + "sep"\ + "okt"\ + "nov"\ + "dec"\ + ""] + ::msgcat::mcset da MONTHS_FULL [list \ + "januar"\ + "februar"\ + "marts"\ + "april"\ + "maj"\ + "juni"\ + "juli"\ + "august"\ + "september"\ + "oktober"\ + "november"\ + "december"\ + ""] + ::msgcat::mcset da BCE "f.Kr." + ::msgcat::mcset da CE "e.Kr." + ::msgcat::mcset da DATE_FORMAT "%d-%m-%Y" + ::msgcat::mcset da TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset da DATE_TIME_FORMAT "%d-%m-%Y %H:%M:%S %z" +} diff --git a/library/msgs/de.msg b/library/msgs/de.msg new file mode 100755 index 0000000..9eb3145 --- /dev/null +++ b/library/msgs/de.msg @@ -0,0 +1,54 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset de DAYS_OF_WEEK_ABBREV [list \ + "So"\ + "Mo"\ + "Di"\ + "Mi"\ + "Do"\ + "Fr"\ + "Sa"] + ::msgcat::mcset de DAYS_OF_WEEK_FULL [list \ + "Sonntag"\ + "Montag"\ + "Dienstag"\ + "Mittwoch"\ + "Donnerstag"\ + "Freitag"\ + "Samstag"] + ::msgcat::mcset de MONTHS_ABBREV [list \ + "Jan"\ + "Feb"\ + "Mrz"\ + "Apr"\ + "Mai"\ + "Jun"\ + "Jul"\ + "Aug"\ + "Sep"\ + "Okt"\ + "Nov"\ + "Dez"\ + ""] + ::msgcat::mcset de MONTHS_FULL [list \ + "Januar"\ + "Februar"\ + "M\u00e4rz"\ + "April"\ + "Mai"\ + "Juni"\ + "Juli"\ + "August"\ + "September"\ + "Oktober"\ + "November"\ + "Dezember"\ + ""] + ::msgcat::mcset de BCE "v. Chr." + ::msgcat::mcset de CE "n. Chr." + ::msgcat::mcset de AM "vorm." + ::msgcat::mcset de PM "nachm." + ::msgcat::mcset de DATE_FORMAT "%d.%m.%Y" + ::msgcat::mcset de TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset de DATE_TIME_FORMAT "%d.%m.%Y %H:%M:%S %z" +} diff --git a/library/msgs/de_AT.msg b/library/msgs/de_AT.msg new file mode 100755 index 0000000..61bc266 --- /dev/null +++ b/library/msgs/de_AT.msg @@ -0,0 +1,35 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset de_AT MONTHS_ABBREV [list \ + "J\u00e4n"\ + "Feb"\ + "M\u00e4r"\ + "Apr"\ + "Mai"\ + "Jun"\ + "Jul"\ + "Aug"\ + "Sep"\ + "Okt"\ + "Nov"\ + "Dez"\ + ""] + ::msgcat::mcset de_AT MONTHS_FULL [list \ + "J\u00e4nner"\ + "Februar"\ + "M\u00e4rz"\ + "April"\ + "Mai"\ + "Juni"\ + "Juli"\ + "August"\ + "September"\ + "Oktober"\ + "November"\ + "Dezember"\ + ""] + ::msgcat::mcset de_AT DATE_FORMAT "%Y-%m-%d" + ::msgcat::mcset de_AT TIME_FORMAT "%T" + ::msgcat::mcset de_AT TIME_FORMAT_12 "%T" + ::msgcat::mcset de_AT DATE_TIME_FORMAT "%a %d %b %Y %T %z" +} diff --git a/library/msgs/de_BE.msg b/library/msgs/de_BE.msg new file mode 100755 index 0000000..3614763 --- /dev/null +++ b/library/msgs/de_BE.msg @@ -0,0 +1,53 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset de_BE DAYS_OF_WEEK_ABBREV [list \ + "Son"\ + "Mon"\ + "Die"\ + "Mit"\ + "Don"\ + "Fre"\ + "Sam"] + ::msgcat::mcset de_BE DAYS_OF_WEEK_FULL [list \ + "Sonntag"\ + "Montag"\ + "Dienstag"\ + "Mittwoch"\ + "Donnerstag"\ + "Freitag"\ + "Samstag"] + ::msgcat::mcset de_BE MONTHS_ABBREV [list \ + "Jan"\ + "Feb"\ + "M\u00e4r"\ + "Apr"\ + "Mai"\ + "Jun"\ + "Jul"\ + "Aug"\ + "Sep"\ + "Okt"\ + "Nov"\ + "Dez"\ + ""] + ::msgcat::mcset de_BE MONTHS_FULL [list \ + "Januar"\ + "Februar"\ + "M\u00e4rz"\ + "April"\ + "Mai"\ + "Juni"\ + "Juli"\ + "August"\ + "September"\ + "Oktober"\ + "November"\ + "Dezember"\ + ""] + ::msgcat::mcset de_BE AM "vorm" + ::msgcat::mcset de_BE PM "nachm" + ::msgcat::mcset de_BE DATE_FORMAT "%Y-%m-%d" + ::msgcat::mcset de_BE TIME_FORMAT "%T" + ::msgcat::mcset de_BE TIME_FORMAT_12 "%T" + ::msgcat::mcset de_BE DATE_TIME_FORMAT "%a %d %b %Y %T %z" +} diff --git a/library/msgs/el.msg b/library/msgs/el.msg new file mode 100755 index 0000000..ac19f62 --- /dev/null +++ b/library/msgs/el.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset el DAYS_OF_WEEK_ABBREV [list \ + "\u039a\u03c5\u03c1"\ + "\u0394\u03b5\u03c5"\ + "\u03a4\u03c1\u03b9"\ + "\u03a4\u03b5\u03c4"\ + "\u03a0\u03b5\u03bc"\ + "\u03a0\u03b1\u03c1"\ + "\u03a3\u03b1\u03b2"] + ::msgcat::mcset el DAYS_OF_WEEK_FULL [list \ + "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae"\ + "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1"\ + "\u03a4\u03c1\u03af\u03c4\u03b7"\ + "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7"\ + "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7"\ + "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae"\ + "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf"] + ::msgcat::mcset el MONTHS_ABBREV [list \ + "\u0399\u03b1\u03bd"\ + "\u03a6\u03b5\u03b2"\ + "\u039c\u03b1\u03c1"\ + "\u0391\u03c0\u03c1"\ + "\u039c\u03b1\u03ca"\ + "\u0399\u03bf\u03c5\u03bd"\ + "\u0399\u03bf\u03c5\u03bb"\ + "\u0391\u03c5\u03b3"\ + "\u03a3\u03b5\u03c0"\ + "\u039f\u03ba\u03c4"\ + "\u039d\u03bf\u03b5"\ + "\u0394\u03b5\u03ba"\ + ""] + ::msgcat::mcset el MONTHS_FULL [list \ + "\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2"\ + "\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2"\ + "\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2"\ + "\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2"\ + "\u039c\u03ac\u03ca\u03bf\u03c2"\ + "\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2"\ + "\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2"\ + "\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2"\ + "\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2"\ + "\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2"\ + "\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2"\ + "\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2"\ + ""] + ::msgcat::mcset el AM "\u03c0\u03bc" + ::msgcat::mcset el PM "\u03bc\u03bc" + ::msgcat::mcset el DATE_FORMAT "%e/%m/%Y" + ::msgcat::mcset el TIME_FORMAT_12 "%l:%M:%S %P" + ::msgcat::mcset el DATE_TIME_FORMAT "%e/%m/%Y %l:%M:%S %P %z" +} diff --git a/library/msgs/en_AU.msg b/library/msgs/en_AU.msg new file mode 100755 index 0000000..7f9870c --- /dev/null +++ b/library/msgs/en_AU.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_AU DATE_FORMAT "%e/%m/%Y" + ::msgcat::mcset en_AU TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset en_AU TIME_FORMAT_12 "%I:%M:%S %P %z" + ::msgcat::mcset en_AU DATE_TIME_FORMAT "%e/%m/%Y %H:%M:%S %z" +} diff --git a/library/msgs/en_BE.msg b/library/msgs/en_BE.msg new file mode 100755 index 0000000..5072986 --- /dev/null +++ b/library/msgs/en_BE.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_BE DATE_FORMAT "%d %b %Y" + ::msgcat::mcset en_BE TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset en_BE TIME_FORMAT_12 "%k h %M min %S s %z" + ::msgcat::mcset en_BE DATE_TIME_FORMAT "%d %b %Y %k:%M:%S %z" +} diff --git a/library/msgs/en_BW.msg b/library/msgs/en_BW.msg new file mode 100755 index 0000000..8fd20c7 --- /dev/null +++ b/library/msgs/en_BW.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_BW DATE_FORMAT "%d %B %Y" + ::msgcat::mcset en_BW TIME_FORMAT_12 "%l:%M:%S %P" + ::msgcat::mcset en_BW DATE_TIME_FORMAT "%d %B %Y %l:%M:%S %P %z" +} diff --git a/library/msgs/en_CA.msg b/library/msgs/en_CA.msg new file mode 100755 index 0000000..278efe7 --- /dev/null +++ b/library/msgs/en_CA.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_CA DATE_FORMAT "%d/%m/%y" + ::msgcat::mcset en_CA TIME_FORMAT "%r" + ::msgcat::mcset en_CA TIME_FORMAT_12 "%I:%M:%S %p" + ::msgcat::mcset en_CA DATE_TIME_FORMAT "%a %d %b %Y %r %z" +} diff --git a/library/msgs/en_GB.msg b/library/msgs/en_GB.msg new file mode 100755 index 0000000..5c61c43 --- /dev/null +++ b/library/msgs/en_GB.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_GB DATE_FORMAT "%d/%m/%y" + ::msgcat::mcset en_GB TIME_FORMAT "%T" + ::msgcat::mcset en_GB TIME_FORMAT_12 "%T" + ::msgcat::mcset en_GB DATE_TIME_FORMAT "%a %d %b %Y %T %z" +} diff --git a/library/msgs/en_HK.msg b/library/msgs/en_HK.msg new file mode 100755 index 0000000..8b33bc0 --- /dev/null +++ b/library/msgs/en_HK.msg @@ -0,0 +1,8 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_HK AM "AM" + ::msgcat::mcset en_HK PM "PM" + ::msgcat::mcset en_HK DATE_FORMAT "%B %e, %Y" + ::msgcat::mcset en_HK TIME_FORMAT_12 "%l:%M:%S %P" + ::msgcat::mcset en_HK DATE_TIME_FORMAT "%B %e, %Y %l:%M:%S %P %z" +} diff --git a/library/msgs/en_IE.msg b/library/msgs/en_IE.msg new file mode 100755 index 0000000..ba621cf --- /dev/null +++ b/library/msgs/en_IE.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_IE DATE_FORMAT "%d/%m/%y" + ::msgcat::mcset en_IE TIME_FORMAT "%T" + ::msgcat::mcset en_IE TIME_FORMAT_12 "%T" + ::msgcat::mcset en_IE DATE_TIME_FORMAT "%a %d %b %Y %T %z" +} diff --git a/library/msgs/en_IN.msg b/library/msgs/en_IN.msg new file mode 100755 index 0000000..a1f155d --- /dev/null +++ b/library/msgs/en_IN.msg @@ -0,0 +1,8 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_IN AM "AM" + ::msgcat::mcset en_IN PM "PM" + ::msgcat::mcset en_IN DATE_FORMAT "%d %B %Y" + ::msgcat::mcset en_IN TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset en_IN DATE_TIME_FORMAT "%d %B %Y %H:%M:%S %z" +} diff --git a/library/msgs/en_NZ.msg b/library/msgs/en_NZ.msg new file mode 100755 index 0000000..b419017 --- /dev/null +++ b/library/msgs/en_NZ.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_NZ DATE_FORMAT "%e/%m/%Y" + ::msgcat::mcset en_NZ TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset en_NZ TIME_FORMAT_12 "%I:%M:%S %P %z" + ::msgcat::mcset en_NZ DATE_TIME_FORMAT "%e/%m/%Y %H:%M:%S %z" +} diff --git a/library/msgs/en_PH.msg b/library/msgs/en_PH.msg new file mode 100755 index 0000000..682666d --- /dev/null +++ b/library/msgs/en_PH.msg @@ -0,0 +1,8 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_PH AM "AM" + ::msgcat::mcset en_PH PM "PM" + ::msgcat::mcset en_PH DATE_FORMAT "%B %e, %Y" + ::msgcat::mcset en_PH TIME_FORMAT_12 "%l:%M:%S %P" + ::msgcat::mcset en_PH DATE_TIME_FORMAT "%B %e, %Y %l:%M:%S %P %z" +} diff --git a/library/msgs/en_SG.msg b/library/msgs/en_SG.msg new file mode 100755 index 0000000..4dc5b1d --- /dev/null +++ b/library/msgs/en_SG.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_SG DATE_FORMAT "%d %b %Y" + ::msgcat::mcset en_SG TIME_FORMAT_12 "%P %I:%M:%S" + ::msgcat::mcset en_SG DATE_TIME_FORMAT "%d %b %Y %P %I:%M:%S %z" +} diff --git a/library/msgs/en_ZA.msg b/library/msgs/en_ZA.msg new file mode 100755 index 0000000..fe43797 --- /dev/null +++ b/library/msgs/en_ZA.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_ZA DATE_FORMAT "%Y/%m/%d" + ::msgcat::mcset en_ZA TIME_FORMAT_12 "%I:%M:%S" + ::msgcat::mcset en_ZA DATE_TIME_FORMAT "%Y/%m/%d %I:%M:%S %z" +} diff --git a/library/msgs/en_ZW.msg b/library/msgs/en_ZW.msg new file mode 100755 index 0000000..2a5804f --- /dev/null +++ b/library/msgs/en_ZW.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset en_ZW DATE_FORMAT "%d %B %Y" + ::msgcat::mcset en_ZW TIME_FORMAT_12 "%l:%M:%S %P" + ::msgcat::mcset en_ZW DATE_TIME_FORMAT "%d %B %Y %l:%M:%S %P %z" +} diff --git a/library/msgs/eo.msg b/library/msgs/eo.msg new file mode 100755 index 0000000..1d2a24f --- /dev/null +++ b/library/msgs/eo.msg @@ -0,0 +1,54 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset eo DAYS_OF_WEEK_ABBREV [list \ + "di"\ + "lu"\ + "ma"\ + "me"\ + "\u0135a"\ + "ve"\ + "sa"] + ::msgcat::mcset eo DAYS_OF_WEEK_FULL [list \ + "diman\u0109o"\ + "lundo"\ + "mardo"\ + "merkredo"\ + "\u0135a\u016ddo"\ + "vendredo"\ + "sabato"] + ::msgcat::mcset eo MONTHS_ABBREV [list \ + "jan"\ + "feb"\ + "mar"\ + "apr"\ + "maj"\ + "jun"\ + "jul"\ + "a\u016dg"\ + "sep"\ + "okt"\ + "nov"\ + "dec"\ + ""] + ::msgcat::mcset eo MONTHS_FULL [list \ + "januaro"\ + "februaro"\ + "marto"\ + "aprilo"\ + "majo"\ + "junio"\ + "julio"\ + "a\u016dgusto"\ + "septembro"\ + "oktobro"\ + "novembro"\ + "decembro"\ + ""] + ::msgcat::mcset eo BCE "aK" + ::msgcat::mcset eo CE "pK" + ::msgcat::mcset eo AM "atm" + ::msgcat::mcset eo PM "ptm" + ::msgcat::mcset eo DATE_FORMAT "%Y-%b-%d" + ::msgcat::mcset eo TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset eo DATE_TIME_FORMAT "%Y-%b-%d %H:%M:%S %z" +} diff --git a/library/msgs/es.msg b/library/msgs/es.msg new file mode 100755 index 0000000..a24f0a1 --- /dev/null +++ b/library/msgs/es.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es DAYS_OF_WEEK_ABBREV [list \ + "dom"\ + "lun"\ + "mar"\ + "mi\u00e9"\ + "jue"\ + "vie"\ + "s\u00e1b"] + ::msgcat::mcset es DAYS_OF_WEEK_FULL [list \ + "domingo"\ + "lunes"\ + "martes"\ + "mi\u00e9rcoles"\ + "jueves"\ + "viernes"\ + "s\u00e1bado"] + ::msgcat::mcset es MONTHS_ABBREV [list \ + "ene"\ + "feb"\ + "mar"\ + "abr"\ + "may"\ + "jun"\ + "jul"\ + "ago"\ + "sep"\ + "oct"\ + "nov"\ + "dic"\ + ""] + ::msgcat::mcset es MONTHS_FULL [list \ + "enero"\ + "febrero"\ + "marzo"\ + "abril"\ + "mayo"\ + "junio"\ + "julio"\ + "agosto"\ + "septiembre"\ + "octubre"\ + "noviembre"\ + "diciembre"\ + ""] + ::msgcat::mcset es BCE "a.C." + ::msgcat::mcset es CE "d.C." + ::msgcat::mcset es DATE_FORMAT "%e de %B de %Y" + ::msgcat::mcset es TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset es DATE_TIME_FORMAT "%e de %B de %Y %k:%M:%S %z" +} diff --git a/library/msgs/es_AR.msg b/library/msgs/es_AR.msg new file mode 100755 index 0000000..7d35027 --- /dev/null +++ b/library/msgs/es_AR.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_AR DATE_FORMAT "%d/%m/%Y" + ::msgcat::mcset es_AR TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset es_AR DATE_TIME_FORMAT "%d/%m/%Y %H:%M:%S %z" +} diff --git a/library/msgs/es_BO.msg b/library/msgs/es_BO.msg new file mode 100755 index 0000000..498ad0d --- /dev/null +++ b/library/msgs/es_BO.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_BO DATE_FORMAT "%d-%m-%Y" + ::msgcat::mcset es_BO TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_BO DATE_TIME_FORMAT "%d-%m-%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_CL.msg b/library/msgs/es_CL.msg new file mode 100755 index 0000000..31d465c --- /dev/null +++ b/library/msgs/es_CL.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_CL DATE_FORMAT "%d-%m-%Y" + ::msgcat::mcset es_CL TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_CL DATE_TIME_FORMAT "%d-%m-%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_CO.msg b/library/msgs/es_CO.msg new file mode 100755 index 0000000..77e57f0 --- /dev/null +++ b/library/msgs/es_CO.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_CO DATE_FORMAT "%e/%m/%Y" + ::msgcat::mcset es_CO TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_CO DATE_TIME_FORMAT "%e/%m/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_CR.msg b/library/msgs/es_CR.msg new file mode 100755 index 0000000..7a652fa --- /dev/null +++ b/library/msgs/es_CR.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_CR DATE_FORMAT "%d/%m/%Y" + ::msgcat::mcset es_CR TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_CR DATE_TIME_FORMAT "%d/%m/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_DO.msg b/library/msgs/es_DO.msg new file mode 100755 index 0000000..0e283da --- /dev/null +++ b/library/msgs/es_DO.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_DO DATE_FORMAT "%m/%d/%Y" + ::msgcat::mcset es_DO TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_DO DATE_TIME_FORMAT "%m/%d/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_EC.msg b/library/msgs/es_EC.msg new file mode 100755 index 0000000..9e921e0 --- /dev/null +++ b/library/msgs/es_EC.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_EC DATE_FORMAT "%d/%m/%Y" + ::msgcat::mcset es_EC TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_EC DATE_TIME_FORMAT "%d/%m/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_GT.msg b/library/msgs/es_GT.msg new file mode 100755 index 0000000..ecd6faf --- /dev/null +++ b/library/msgs/es_GT.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_GT DATE_FORMAT "%e/%m/%Y" + ::msgcat::mcset es_GT TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_GT DATE_TIME_FORMAT "%e/%m/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_HN.msg b/library/msgs/es_HN.msg new file mode 100755 index 0000000..a758ca2 --- /dev/null +++ b/library/msgs/es_HN.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_HN DATE_FORMAT "%m-%d-%Y" + ::msgcat::mcset es_HN TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_HN DATE_TIME_FORMAT "%m-%d-%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_MX.msg b/library/msgs/es_MX.msg new file mode 100755 index 0000000..7cfb545 --- /dev/null +++ b/library/msgs/es_MX.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_MX DATE_FORMAT "%e/%m/%Y" + ::msgcat::mcset es_MX TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_MX DATE_TIME_FORMAT "%e/%m/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_NI.msg b/library/msgs/es_NI.msg new file mode 100755 index 0000000..7c39495 --- /dev/null +++ b/library/msgs/es_NI.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_NI DATE_FORMAT "%m-%d-%Y" + ::msgcat::mcset es_NI TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_NI DATE_TIME_FORMAT "%m-%d-%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_PA.msg b/library/msgs/es_PA.msg new file mode 100755 index 0000000..cecacdc --- /dev/null +++ b/library/msgs/es_PA.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_PA DATE_FORMAT "%m/%d/%Y" + ::msgcat::mcset es_PA TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_PA DATE_TIME_FORMAT "%m/%d/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_PE.msg b/library/msgs/es_PE.msg new file mode 100755 index 0000000..9f90595 --- /dev/null +++ b/library/msgs/es_PE.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_PE DATE_FORMAT "%d/%m/%Y" + ::msgcat::mcset es_PE TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_PE DATE_TIME_FORMAT "%d/%m/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_PR.msg b/library/msgs/es_PR.msg new file mode 100755 index 0000000..8511b12 --- /dev/null +++ b/library/msgs/es_PR.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_PR DATE_FORMAT "%m-%d-%Y" + ::msgcat::mcset es_PR TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_PR DATE_TIME_FORMAT "%m-%d-%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_PY.msg b/library/msgs/es_PY.msg new file mode 100755 index 0000000..aa93d36 --- /dev/null +++ b/library/msgs/es_PY.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_PY DATE_FORMAT "%d/%m/%Y" + ::msgcat::mcset es_PY TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_PY DATE_TIME_FORMAT "%d/%m/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_SV.msg b/library/msgs/es_SV.msg new file mode 100755 index 0000000..fc7954d --- /dev/null +++ b/library/msgs/es_SV.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_SV DATE_FORMAT "%m-%d-%Y" + ::msgcat::mcset es_SV TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_SV DATE_TIME_FORMAT "%m-%d-%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_UY.msg b/library/msgs/es_UY.msg new file mode 100755 index 0000000..b33525c --- /dev/null +++ b/library/msgs/es_UY.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_UY DATE_FORMAT "%d/%m/%Y" + ::msgcat::mcset es_UY TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_UY DATE_TIME_FORMAT "%d/%m/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/es_VE.msg b/library/msgs/es_VE.msg new file mode 100755 index 0000000..7c2a7b0 --- /dev/null +++ b/library/msgs/es_VE.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset es_VE DATE_FORMAT "%d/%m/%Y" + ::msgcat::mcset es_VE TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset es_VE DATE_TIME_FORMAT "%d/%m/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/et.msg b/library/msgs/et.msg new file mode 100755 index 0000000..8d32e9e --- /dev/null +++ b/library/msgs/et.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset et DAYS_OF_WEEK_ABBREV [list \ + "P"\ + "E"\ + "T"\ + "K"\ + "N"\ + "R"\ + "L"] + ::msgcat::mcset et DAYS_OF_WEEK_FULL [list \ + "p\u00fchap\u00e4ev"\ + "esmasp\u00e4ev"\ + "teisip\u00e4ev"\ + "kolmap\u00e4ev"\ + "neljap\u00e4ev"\ + "reede"\ + "laup\u00e4ev"] + ::msgcat::mcset et MONTHS_ABBREV [list \ + "Jaan"\ + "Veebr"\ + "M\u00e4rts"\ + "Apr"\ + "Mai"\ + "Juuni"\ + "Juuli"\ + "Aug"\ + "Sept"\ + "Okt"\ + "Nov"\ + "Dets"\ + ""] + ::msgcat::mcset et MONTHS_FULL [list \ + "Jaanuar"\ + "Veebruar"\ + "M\u00e4rts"\ + "Aprill"\ + "Mai"\ + "Juuni"\ + "Juuli"\ + "August"\ + "September"\ + "Oktoober"\ + "November"\ + "Detsember"\ + ""] + ::msgcat::mcset et BCE "e.m.a." + ::msgcat::mcset et CE "m.a.j." + ::msgcat::mcset et DATE_FORMAT "%e-%m-%Y" + ::msgcat::mcset et TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset et DATE_TIME_FORMAT "%e-%m-%Y %k:%M:%S %z" +} diff --git a/library/msgs/eu.msg b/library/msgs/eu.msg new file mode 100755 index 0000000..cf708b6 --- /dev/null +++ b/library/msgs/eu.msg @@ -0,0 +1,47 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset eu DAYS_OF_WEEK_ABBREV [list \ + "igandea"\ + "astelehena"\ + "asteartea"\ + "asteazkena"\ + "osteguna"\ + "ostirala"\ + "larunbata"] + ::msgcat::mcset eu DAYS_OF_WEEK_FULL [list \ + "igandea"\ + "astelehena"\ + "asteartea"\ + "asteazkena"\ + "osteguna"\ + "ostirala"\ + "larunbata"] + ::msgcat::mcset eu MONTHS_ABBREV [list \ + "urt"\ + "ots"\ + "mar"\ + "api"\ + "mai"\ + "eka"\ + "uzt"\ + "abu"\ + "ira"\ + "urr"\ + "aza"\ + "abe"\ + ""] + ::msgcat::mcset eu MONTHS_FULL [list \ + "urtarrila"\ + "otsaila"\ + "martxoa"\ + "apirila"\ + "maiatza"\ + "ekaina"\ + "uztaila"\ + "abuztua"\ + "iraila"\ + "urria"\ + "azaroa"\ + "abendua"\ + ""] +} diff --git a/library/msgs/eu_ES.msg b/library/msgs/eu_ES.msg new file mode 100755 index 0000000..2694418 --- /dev/null +++ b/library/msgs/eu_ES.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset eu_ES DATE_FORMAT "%a, %Yeko %bren %da" + ::msgcat::mcset eu_ES TIME_FORMAT "%T" + ::msgcat::mcset eu_ES TIME_FORMAT_12 "%T" + ::msgcat::mcset eu_ES DATE_TIME_FORMAT "%y-%m-%d %T %z" +} diff --git a/library/msgs/fa.msg b/library/msgs/fa.msg new file mode 100755 index 0000000..89b2f90 --- /dev/null +++ b/library/msgs/fa.msg @@ -0,0 +1,47 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset fa DAYS_OF_WEEK_ABBREV [list \ + "\u06cc\u2214"\ + "\u062f\u2214"\ + "\u0633\u2214"\ + "\u0686\u2214"\ + "\u067e\u2214"\ + "\u062c\u2214"\ + "\u0634\u2214"] + ::msgcat::mcset fa DAYS_OF_WEEK_FULL [list \ + "\u06cc\u06cc\u200c\u0634\u0646\u0628\u0647"\ + "\u062f\u0648\u0634\u0646\u0628\u0647"\ + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647"\ + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647"\ + "\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647"\ + "\u062c\u0645\u0639\u0647"\ + "\u0634\u0646\u0628\u0647"] + ::msgcat::mcset fa MONTHS_ABBREV [list \ + "\u0698\u0627\u0646"\ + "\u0641\u0648\u0631"\ + "\u0645\u0627\u0631"\ + "\u0622\u0648\u0631"\ + "\u0645\u0640\u0647"\ + "\u0698\u0648\u0646"\ + "\u0698\u0648\u06cc"\ + "\u0627\u0648\u062a"\ + "\u0633\u067e\u062a"\ + "\u0627\u0643\u062a"\ + "\u0646\u0648\u0627"\ + "\u062f\u0633\u0627"\ + ""] + ::msgcat::mcset fa MONTHS_FULL [list \ + "\u0698\u0627\u0646\u0648\u06cc\u0647"\ + "\u0641\u0648\u0631\u0648\u06cc\u0647"\ + "\u0645\u0627\u0631\u0633"\ + "\u0622\u0648\u0631\u06cc\u0644"\ + "\u0645\u0647"\ + "\u0698\u0648\u0626\u0646"\ + "\u0698\u0648\u0626\u06cc\u0647"\ + "\u0627\u0648\u062a"\ + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631"\ + "\u0627\u0643\u062a\u0628\u0631"\ + "\u0646\u0648\u0627\u0645\u0628\u0631"\ + "\u062f\u0633\u0627\u0645\u0628\u0631"\ + ""] +} diff --git a/library/msgs/fa_IN.msg b/library/msgs/fa_IN.msg new file mode 100755 index 0000000..adc9e91 --- /dev/null +++ b/library/msgs/fa_IN.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset fa_IN DAYS_OF_WEEK_ABBREV [list \ + "\u06cc\u2214"\ + "\u062f\u2214"\ + "\u0633\u2214"\ + "\u0686\u2214"\ + "\u067e\u2214"\ + "\u062c\u2214"\ + "\u0634\u2214"] + ::msgcat::mcset fa_IN DAYS_OF_WEEK_FULL [list \ + "\u06cc\u06cc\u200c\u0634\u0646\u0628\u0647"\ + "\u062f\u0648\u0634\u0646\u0628\u0647"\ + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647"\ + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647"\ + "\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647"\ + "\u062c\u0645\u0639\u0647"\ + "\u0634\u0646\u0628\u0647"] + ::msgcat::mcset fa_IN MONTHS_ABBREV [list \ + "\u0698\u0627\u0646"\ + "\u0641\u0648\u0631"\ + "\u0645\u0627\u0631"\ + "\u0622\u0648\u0631"\ + "\u0645\u0640\u0647"\ + "\u0698\u0648\u0646"\ + "\u0698\u0648\u06cc"\ + "\u0627\u0648\u062a"\ + "\u0633\u067e\u062a"\ + "\u0627\u0643\u062a"\ + "\u0646\u0648\u0627"\ + "\u062f\u0633\u0627"\ + ""] + ::msgcat::mcset fa_IN MONTHS_FULL [list \ + "\u0698\u0627\u0646\u0648\u06cc\u0647"\ + "\u0641\u0648\u0631\u0648\u06cc\u0647"\ + "\u0645\u0627\u0631\u0633"\ + "\u0622\u0648\u0631\u06cc\u0644"\ + "\u0645\u0647"\ + "\u0698\u0648\u0626\u0646"\ + "\u0698\u0648\u0626\u06cc\u0647"\ + "\u0627\u0648\u062a"\ + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631"\ + "\u0627\u0643\u062a\u0628\u0631"\ + "\u0646\u0648\u0627\u0645\u0628\u0631"\ + "\u062f\u0633\u0627\u0645\u0628\u0631"\ + ""] + ::msgcat::mcset fa_IN AM "\u0635\u0628\u062d" + ::msgcat::mcset fa_IN PM "\u0639\u0635\u0631" + ::msgcat::mcset fa_IN DATE_FORMAT "%A %d %B %Y" + ::msgcat::mcset fa_IN TIME_FORMAT_12 "%I:%M:%S %z" + ::msgcat::mcset fa_IN DATE_TIME_FORMAT "%A %d %B %Y %I:%M:%S %z %z" +} diff --git a/library/msgs/fa_IR.msg b/library/msgs/fa_IR.msg new file mode 100755 index 0000000..597ce9d --- /dev/null +++ b/library/msgs/fa_IR.msg @@ -0,0 +1,9 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset fa_IR AM "\u0635\u0628\u062d" + ::msgcat::mcset fa_IR PM "\u0639\u0635\u0631" + ::msgcat::mcset fa_IR DATE_FORMAT "%d\u2044%m\u2044%Y" + ::msgcat::mcset fa_IR TIME_FORMAT "%S:%M:%H" + ::msgcat::mcset fa_IR TIME_FORMAT_12 "%S:%M:%l %P" + ::msgcat::mcset fa_IR DATE_TIME_FORMAT "%d\u2044%m\u2044%Y %S:%M:%H %z" +} diff --git a/library/msgs/fi.msg b/library/msgs/fi.msg new file mode 100755 index 0000000..acabba0 --- /dev/null +++ b/library/msgs/fi.msg @@ -0,0 +1,50 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset fi DAYS_OF_WEEK_ABBREV [list \ + "su"\ + "ma"\ + "ti"\ + "ke"\ + "to"\ + "pe"\ + "la"] + ::msgcat::mcset fi DAYS_OF_WEEK_FULL [list \ + "sunnuntai"\ + "maanantai"\ + "tiistai"\ + "keskiviikko"\ + "torstai"\ + "perjantai"\ + "lauantai"] + ::msgcat::mcset fi MONTHS_ABBREV [list \ + "tammi"\ + "helmi"\ + "maalis"\ + "huhti"\ + "touko"\ + "kes\u00e4"\ + "hein\u00e4"\ + "elo"\ + "syys"\ + "loka"\ + "marras"\ + "joulu"\ + ""] + ::msgcat::mcset fi MONTHS_FULL [list \ + "tammikuu"\ + "helmikuu"\ + "maaliskuu"\ + "huhtikuu"\ + "toukokuu"\ + "kes\u00e4kuu"\ + "hein\u00e4kuu"\ + "elokuu"\ + "syyskuu"\ + "lokakuu"\ + "marraskuu"\ + "joulukuu"\ + ""] + ::msgcat::mcset fi DATE_FORMAT "%e.%m.%Y" + ::msgcat::mcset fi TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset fi DATE_TIME_FORMAT "%e.%m.%Y %k:%M:%S %z" +} diff --git a/library/msgs/fo.msg b/library/msgs/fo.msg new file mode 100755 index 0000000..4696e62 --- /dev/null +++ b/library/msgs/fo.msg @@ -0,0 +1,47 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset fo DAYS_OF_WEEK_ABBREV [list \ + "sun"\ + "m\u00e1n"\ + "t\u00fds"\ + "mik"\ + "h\u00f3s"\ + "fr\u00ed"\ + "ley"] + ::msgcat::mcset fo DAYS_OF_WEEK_FULL [list \ + "sunnudagur"\ + "m\u00e1nadagur"\ + "t\u00fdsdagur"\ + "mikudagur"\ + "h\u00f3sdagur"\ + "fr\u00edggjadagur"\ + "leygardagur"] + ::msgcat::mcset fo MONTHS_ABBREV [list \ + "jan"\ + "feb"\ + "mar"\ + "apr"\ + "mai"\ + "jun"\ + "jul"\ + "aug"\ + "sep"\ + "okt"\ + "nov"\ + "des"\ + ""] + ::msgcat::mcset fo MONTHS_FULL [list \ + "januar"\ + "februar"\ + "mars"\ + "apr\u00edl"\ + "mai"\ + "juni"\ + "juli"\ + "august"\ + "september"\ + "oktober"\ + "november"\ + "desember"\ + ""] +} diff --git a/library/msgs/fo_FO.msg b/library/msgs/fo_FO.msg new file mode 100755 index 0000000..2392b8e --- /dev/null +++ b/library/msgs/fo_FO.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset fo_FO DATE_FORMAT "%d/%m-%Y" + ::msgcat::mcset fo_FO TIME_FORMAT "%T" + ::msgcat::mcset fo_FO TIME_FORMAT_12 "%T" + ::msgcat::mcset fo_FO DATE_TIME_FORMAT "%a %d %b %Y %T %z" +} diff --git a/library/msgs/fr.msg b/library/msgs/fr.msg new file mode 100755 index 0000000..55b19bf --- /dev/null +++ b/library/msgs/fr.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset fr DAYS_OF_WEEK_ABBREV [list \ + "dim."\ + "lun."\ + "mar."\ + "mer."\ + "jeu."\ + "ven."\ + "sam."] + ::msgcat::mcset fr DAYS_OF_WEEK_FULL [list \ + "dimanche"\ + "lundi"\ + "mardi"\ + "mercredi"\ + "jeudi"\ + "vendredi"\ + "samedi"] + ::msgcat::mcset fr MONTHS_ABBREV [list \ + "janv."\ + "f\u00e9vr."\ + "mars"\ + "avr."\ + "mai"\ + "juin"\ + "juil."\ + "ao\u00fbt"\ + "sept."\ + "oct."\ + "nov."\ + "d\u00e9c."\ + ""] + ::msgcat::mcset fr MONTHS_FULL [list \ + "janvier"\ + "f\u00e9vrier"\ + "mars"\ + "avril"\ + "mai"\ + "juin"\ + "juillet"\ + "ao\u00fbt"\ + "septembre"\ + "octobre"\ + "novembre"\ + "d\u00e9cembre"\ + ""] + ::msgcat::mcset fr BCE "av. J.-C." + ::msgcat::mcset fr CE "ap. J.-C." + ::msgcat::mcset fr DATE_FORMAT "%e %B %Y" + ::msgcat::mcset fr TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset fr DATE_TIME_FORMAT "%e %B %Y %H:%M:%S %z" +} diff --git a/library/msgs/fr_BE.msg b/library/msgs/fr_BE.msg new file mode 100755 index 0000000..cdb13bd --- /dev/null +++ b/library/msgs/fr_BE.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset fr_BE DATE_FORMAT "%d/%m/%y" + ::msgcat::mcset fr_BE TIME_FORMAT "%T" + ::msgcat::mcset fr_BE TIME_FORMAT_12 "%T" + ::msgcat::mcset fr_BE DATE_TIME_FORMAT "%a %d %b %Y %T %z" +} diff --git a/library/msgs/fr_CA.msg b/library/msgs/fr_CA.msg new file mode 100755 index 0000000..00ccfff --- /dev/null +++ b/library/msgs/fr_CA.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset fr_CA DATE_FORMAT "%Y-%m-%d" + ::msgcat::mcset fr_CA TIME_FORMAT "%T" + ::msgcat::mcset fr_CA TIME_FORMAT_12 "%T" + ::msgcat::mcset fr_CA DATE_TIME_FORMAT "%a %d %b %Y %T %z" +} diff --git a/library/msgs/fr_CH.msg b/library/msgs/fr_CH.msg new file mode 100755 index 0000000..7e2bac7 --- /dev/null +++ b/library/msgs/fr_CH.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset fr_CH DATE_FORMAT "%d. %m. %y" + ::msgcat::mcset fr_CH TIME_FORMAT "%T" + ::msgcat::mcset fr_CH TIME_FORMAT_12 "%T" + ::msgcat::mcset fr_CH DATE_TIME_FORMAT "%a %d %b %Y %T %z" +} diff --git a/library/msgs/ga.msg b/library/msgs/ga.msg new file mode 100755 index 0000000..6edf13a --- /dev/null +++ b/library/msgs/ga.msg @@ -0,0 +1,47 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ga DAYS_OF_WEEK_ABBREV [list \ + "Domh"\ + "Luan"\ + "M\u00e1irt"\ + "C\u00e9ad"\ + "D\u00e9ar"\ + "Aoine"\ + "Sath"] + ::msgcat::mcset ga DAYS_OF_WEEK_FULL [list \ + "D\u00e9 Domhnaigh"\ + "D\u00e9 Luain"\ + "D\u00e9 M\u00e1irt"\ + "D\u00e9 C\u00e9adaoin"\ + "D\u00e9ardaoin"\ + "D\u00e9 hAoine"\ + "D\u00e9 Sathairn"] + ::msgcat::mcset ga MONTHS_ABBREV [list \ + "Ean"\ + "Feabh"\ + "M\u00e1rta"\ + "Aib"\ + "Beal"\ + "Meith"\ + "I\u00fail"\ + "L\u00fan"\ + "MF\u00f3mh"\ + "DF\u00f3mh"\ + "Samh"\ + "Noll"\ + ""] + ::msgcat::mcset ga MONTHS_FULL [list \ + "Ean\u00e1ir"\ + "Feabhra"\ + "M\u00e1rta"\ + "Aibre\u00e1n"\ + "M\u00ed na Bealtaine"\ + "Meith"\ + "I\u00fail"\ + "L\u00fanasa"\ + "Me\u00e1n F\u00f3mhair"\ + "Deireadh F\u00f3mhair"\ + "M\u00ed na Samhna"\ + "M\u00ed na Nollag"\ + ""] +} diff --git a/library/msgs/ga_IE.msg b/library/msgs/ga_IE.msg new file mode 100755 index 0000000..b6acbbc --- /dev/null +++ b/library/msgs/ga_IE.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ga_IE DATE_FORMAT "%d.%m.%y" + ::msgcat::mcset ga_IE TIME_FORMAT "%T" + ::msgcat::mcset ga_IE TIME_FORMAT_12 "%T" + ::msgcat::mcset ga_IE DATE_TIME_FORMAT "%a %d %b %Y %T %z" +} diff --git a/library/msgs/gl.msg b/library/msgs/gl.msg new file mode 100755 index 0000000..4b869e8 --- /dev/null +++ b/library/msgs/gl.msg @@ -0,0 +1,47 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset gl DAYS_OF_WEEK_ABBREV [list \ + "Dom"\ + "Lun"\ + "Mar"\ + "M\u00e9r"\ + "Xov"\ + "Ven"\ + "S\u00e1b"] + ::msgcat::mcset gl DAYS_OF_WEEK_FULL [list \ + "Domingo"\ + "Luns"\ + "Martes"\ + "M\u00e9rcores"\ + "Xoves"\ + "Venres"\ + "S\u00e1bado"] + ::msgcat::mcset gl MONTHS_ABBREV [list \ + "Xan"\ + "Feb"\ + "Mar"\ + "Abr"\ + "Mai"\ + "Xu\u00f1"\ + "Xul"\ + "Ago"\ + "Set"\ + "Out"\ + "Nov"\ + "Dec"\ + ""] + ::msgcat::mcset gl MONTHS_FULL [list \ + "Xaneiro"\ + "Febreiro"\ + "Marzo"\ + "Abril"\ + "Maio"\ + "Xu\u00f1o"\ + "Xullo"\ + "Agosto"\ + "Setembro"\ + "Outubro"\ + "Novembro"\ + "Decembro"\ + ""] +} diff --git a/library/msgs/gl_ES.msg b/library/msgs/gl_ES.msg new file mode 100755 index 0000000..d4ed270 --- /dev/null +++ b/library/msgs/gl_ES.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset gl_ES DATE_FORMAT "%d %B %Y" + ::msgcat::mcset gl_ES TIME_FORMAT_12 "%l:%M:%S %P" + ::msgcat::mcset gl_ES DATE_TIME_FORMAT "%d %B %Y %l:%M:%S %P %z" +} diff --git a/library/msgs/gv.msg b/library/msgs/gv.msg new file mode 100755 index 0000000..7d332ad --- /dev/null +++ b/library/msgs/gv.msg @@ -0,0 +1,47 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset gv DAYS_OF_WEEK_ABBREV [list \ + "Jed"\ + "Jel"\ + "Jem"\ + "Jerc"\ + "Jerd"\ + "Jeh"\ + "Jes"] + ::msgcat::mcset gv DAYS_OF_WEEK_FULL [list \ + "Jedoonee"\ + "Jelhein"\ + "Jemayrt"\ + "Jercean"\ + "Jerdein"\ + "Jeheiney"\ + "Jesarn"] + ::msgcat::mcset gv MONTHS_ABBREV [list \ + "J-guer"\ + "T-arree"\ + "Mayrnt"\ + "Avrril"\ + "Boaldyn"\ + "M-souree"\ + "J-souree"\ + "Luanistyn"\ + "M-fouyir"\ + "J-fouyir"\ + "M.Houney"\ + "M.Nollick"\ + ""] + ::msgcat::mcset gv MONTHS_FULL [list \ + "Jerrey-geuree"\ + "Toshiaght-arree"\ + "Mayrnt"\ + "Averil"\ + "Boaldyn"\ + "Mean-souree"\ + "Jerrey-souree"\ + "Luanistyn"\ + "Mean-fouyir"\ + "Jerrey-fouyir"\ + "Mee Houney"\ + "Mee ny Nollick"\ + ""] +} diff --git a/library/msgs/gv_GB.msg b/library/msgs/gv_GB.msg new file mode 100755 index 0000000..5e96e6f --- /dev/null +++ b/library/msgs/gv_GB.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset gv_GB DATE_FORMAT "%d %B %Y" + ::msgcat::mcset gv_GB TIME_FORMAT_12 "%l:%M:%S %P" + ::msgcat::mcset gv_GB DATE_TIME_FORMAT "%d %B %Y %l:%M:%S %P %z" +} diff --git a/library/msgs/he.msg b/library/msgs/he.msg new file mode 100755 index 0000000..52a94e2 --- /dev/null +++ b/library/msgs/he.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset he DAYS_OF_WEEK_ABBREV [list \ + "\u05d0"\ + "\u05d1"\ + "\u05d2"\ + "\u05d3"\ + "\u05d4"\ + "\u05d5"\ + "\u05e9"] + ::msgcat::mcset he DAYS_OF_WEEK_FULL [list \ + "\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df"\ + "\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9"\ + "\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9"\ + "\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9"\ + "\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9"\ + "\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9"\ + "\u05e9\u05d1\u05ea"] + ::msgcat::mcset he MONTHS_ABBREV [list \ + "\u05d9\u05e0\u05d5"\ + "\u05e4\u05d1\u05e8"\ + "\u05de\u05e8\u05e5"\ + "\u05d0\u05e4\u05e8"\ + "\u05de\u05d0\u05d9"\ + "\u05d9\u05d5\u05e0"\ + "\u05d9\u05d5\u05dc"\ + "\u05d0\u05d5\u05d2"\ + "\u05e1\u05e4\u05d8"\ + "\u05d0\u05d5\u05e7"\ + "\u05e0\u05d5\u05d1"\ + "\u05d3\u05e6\u05de"\ + ""] + ::msgcat::mcset he MONTHS_FULL [list \ + "\u05d9\u05e0\u05d5\u05d0\u05e8"\ + "\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8"\ + "\u05de\u05e8\u05e5"\ + "\u05d0\u05e4\u05e8\u05d9\u05dc"\ + "\u05de\u05d0\u05d9"\ + "\u05d9\u05d5\u05e0\u05d9"\ + "\u05d9\u05d5\u05dc\u05d9"\ + "\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8"\ + "\u05e1\u05e4\u05d8\u05de\u05d1\u05e8"\ + "\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8"\ + "\u05e0\u05d5\u05d1\u05de\u05d1\u05e8"\ + "\u05d3\u05e6\u05de\u05d1\u05e8"\ + ""] + ::msgcat::mcset he BCE "\u05dc\u05e1\u05d4"\u05e0" + ::msgcat::mcset he CE "\u05dc\u05e4\u05e1\u05d4"\u05e0" + ::msgcat::mcset he DATE_FORMAT "%d/%m/%Y" + ::msgcat::mcset he TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset he DATE_TIME_FORMAT "%d/%m/%Y %H:%M:%S %z" +} diff --git a/library/msgs/hi.msg b/library/msgs/hi.msg new file mode 100755 index 0000000..50c9fb8 --- /dev/null +++ b/library/msgs/hi.msg @@ -0,0 +1,39 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset hi DAYS_OF_WEEK_FULL [list \ + "\u0930\u0935\u093f\u0935\u093e\u0930"\ + "\u0938\u094b\u092e\u0935\u093e\u0930"\ + "\u092e\u0902\u0917\u0932\u0935\u093e\u0930"\ + "\u092c\u0941\u0927\u0935\u093e\u0930"\ + "\u0917\u0941\u0930\u0941\u0935\u093e\u0930"\ + "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930"\ + "\u0936\u0928\u093f\u0935\u093e\u0930"] + ::msgcat::mcset hi MONTHS_ABBREV [list \ + "\u091c\u0928\u0935\u0930\u0940"\ + "\u092b\u093c\u0930\u0935\u0930\u0940"\ + "\u092e\u093e\u0930\u094d\u091a"\ + "\u0905\u092a\u094d\u0930\u0947\u0932"\ + "\u092e\u0908"\ + "\u091c\u0942\u0928"\ + "\u091c\u0941\u0932\u093e\u0908"\ + "\u0905\u0917\u0938\u094d\u0924"\ + "\u0938\u093f\u0924\u092e\u094d\u092c\u0930"\ + "\u0905\u0915\u094d\u091f\u0942\u092c\u0930"\ + "\u0928\u0935\u092e\u094d\u092c\u0930"\ + "\u0926\u093f\u0938\u092e\u094d\u092c\u0930"] + ::msgcat::mcset hi MONTHS_FULL [list \ + "\u091c\u0928\u0935\u0930\u0940"\ + "\u092b\u093c\u0930\u0935\u0930\u0940"\ + "\u092e\u093e\u0930\u094d\u091a"\ + "\u0905\u092a\u094d\u0930\u0947\u0932"\ + "\u092e\u0908"\ + "\u091c\u0942\u0928"\ + "\u091c\u0941\u0932\u093e\u0908"\ + "\u0905\u0917\u0938\u094d\u0924"\ + "\u0938\u093f\u0924\u092e\u094d\u092c\u0930"\ + "\u0905\u0915\u094d\u091f\u0942\u092c\u0930"\ + "\u0928\u0935\u092e\u094d\u092c\u0930"\ + "\u0926\u093f\u0938\u092e\u094d\u092c\u0930"] + ::msgcat::mcset hi AM "\u0908\u0938\u093e\u092a\u0942\u0930\u094d\u0935" + ::msgcat::mcset hi PM "." +} diff --git a/library/msgs/hi_IN.msg b/library/msgs/hi_IN.msg new file mode 100755 index 0000000..239793f --- /dev/null +++ b/library/msgs/hi_IN.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset hi_IN DATE_FORMAT "%d %M %Y" + ::msgcat::mcset hi_IN TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset hi_IN DATE_TIME_FORMAT "%d %M %Y %I:%M:%S %P %z" +} diff --git a/library/msgs/hr.msg b/library/msgs/hr.msg new file mode 100755 index 0000000..cec145b --- /dev/null +++ b/library/msgs/hr.msg @@ -0,0 +1,50 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset hr DAYS_OF_WEEK_ABBREV [list \ + "ned"\ + "pon"\ + "uto"\ + "sri"\ + "\u010det"\ + "pet"\ + "sub"] + ::msgcat::mcset hr DAYS_OF_WEEK_FULL [list \ + "nedjelja"\ + "ponedjeljak"\ + "utorak"\ + "srijeda"\ + "\u010detvrtak"\ + "petak"\ + "subota"] + ::msgcat::mcset hr MONTHS_ABBREV [list \ + "sij"\ + "vel"\ + "o\u017eu"\ + "tra"\ + "svi"\ + "lip"\ + "srp"\ + "kol"\ + "ruj"\ + "lis"\ + "stu"\ + "pro"\ + ""] + ::msgcat::mcset hr MONTHS_FULL [list \ + "sije\u010danj"\ + "velja\u010da"\ + "o\u017eujak"\ + "travanj"\ + "svibanj"\ + "lipanj"\ + "srpanj"\ + "kolovoz"\ + "rujan"\ + "listopad"\ + "studeni"\ + "prosinac"\ + ""] + ::msgcat::mcset hr DATE_FORMAT "%Y.%m.%d" + ::msgcat::mcset hr TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset hr DATE_TIME_FORMAT "%Y.%m.%d %H:%M:%S %z" +} diff --git a/library/msgs/hu.msg b/library/msgs/hu.msg new file mode 100755 index 0000000..e5e68d9 --- /dev/null +++ b/library/msgs/hu.msg @@ -0,0 +1,54 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset hu DAYS_OF_WEEK_ABBREV [list \ + "V"\ + "H"\ + "K"\ + "Sze"\ + "Cs"\ + "P"\ + "Szo"] + ::msgcat::mcset hu DAYS_OF_WEEK_FULL [list \ + "vas\u00e1rnap"\ + "h\u00e9tf\u0151"\ + "kedd"\ + "szerda"\ + "cs\u00fct\u00f6rt\u00f6k"\ + "p\u00e9ntek"\ + "szombat"] + ::msgcat::mcset hu MONTHS_ABBREV [list \ + "jan."\ + "febr."\ + "m\u00e1rc."\ + "\u00e1pr."\ + "m\u00e1j."\ + "j\u00fan."\ + "j\u00fal."\ + "aug."\ + "szept."\ + "okt."\ + "nov."\ + "dec."\ + ""] + ::msgcat::mcset hu MONTHS_FULL [list \ + "janu\u00e1r"\ + "febru\u00e1r"\ + "m\u00e1rcius"\ + "\u00e1prilis"\ + "m\u00e1jus"\ + "j\u00fanius"\ + "j\u00falius"\ + "augusztus"\ + "szeptember"\ + "okt\u00f3ber"\ + "november"\ + "december"\ + ""] + ::msgcat::mcset hu BCE "i.e." + ::msgcat::mcset hu CE "i.u." + ::msgcat::mcset hu AM "DE" + ::msgcat::mcset hu PM "DU" + ::msgcat::mcset hu DATE_FORMAT "%Y.%m.%d." + ::msgcat::mcset hu TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset hu DATE_TIME_FORMAT "%Y.%m.%d. %k:%M:%S %z" +} diff --git a/library/msgs/id.msg b/library/msgs/id.msg new file mode 100755 index 0000000..17c6bb5 --- /dev/null +++ b/library/msgs/id.msg @@ -0,0 +1,47 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset id DAYS_OF_WEEK_ABBREV [list \ + "Min"\ + "Sen"\ + "Sel"\ + "Rab"\ + "Kam"\ + "Jum"\ + "Sab"] + ::msgcat::mcset id DAYS_OF_WEEK_FULL [list \ + "Minggu"\ + "Senin"\ + "Selasa"\ + "Rabu"\ + "Kamis"\ + "Jumat"\ + "Sabtu"] + ::msgcat::mcset id MONTHS_ABBREV [list \ + "Jan"\ + "Peb"\ + "Mar"\ + "Apr"\ + "Mei"\ + "Jun"\ + "Jul"\ + "Agu"\ + "Sep"\ + "Okt"\ + "Nov"\ + "Des"\ + ""] + ::msgcat::mcset id MONTHS_FULL [list \ + "Januari"\ + "Pebruari"\ + "Maret"\ + "April"\ + "Mei"\ + "Juni"\ + "Juli"\ + "Agustus"\ + "September"\ + "Oktober"\ + "November"\ + "Desember"\ + ""] +} diff --git a/library/msgs/id_ID.msg b/library/msgs/id_ID.msg new file mode 100755 index 0000000..bb672c1 --- /dev/null +++ b/library/msgs/id_ID.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset id_ID DATE_FORMAT "%d %B %Y" + ::msgcat::mcset id_ID TIME_FORMAT_12 "%l:%M:%S %P" + ::msgcat::mcset id_ID DATE_TIME_FORMAT "%d %B %Y %l:%M:%S %P %z" +} diff --git a/library/msgs/is.msg b/library/msgs/is.msg new file mode 100755 index 0000000..adc2d2a --- /dev/null +++ b/library/msgs/is.msg @@ -0,0 +1,50 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset is DAYS_OF_WEEK_ABBREV [list \ + "sun."\ + "m\u00e1n."\ + "\u00feri."\ + "mi\u00f0."\ + "fim."\ + "f\u00f6s."\ + "lau."] + ::msgcat::mcset is DAYS_OF_WEEK_FULL [list \ + "sunnudagur"\ + "m\u00e1nudagur"\ + "\u00feri\u00f0judagur"\ + "mi\u00f0vikudagur"\ + "fimmtudagur"\ + "f\u00f6studagur"\ + "laugardagur"] + ::msgcat::mcset is MONTHS_ABBREV [list \ + "jan."\ + "feb."\ + "mar."\ + "apr."\ + "ma\u00ed"\ + "j\u00fan."\ + "j\u00fal."\ + "\u00e1g\u00fa."\ + "sep."\ + "okt."\ + "n\u00f3v."\ + "des."\ + ""] + ::msgcat::mcset is MONTHS_FULL [list \ + "jan\u00faar"\ + "febr\u00faar"\ + "mars"\ + "apr\u00edl"\ + "ma\u00ed"\ + "j\u00fan\u00ed"\ + "j\u00fal\u00ed"\ + "\u00e1g\u00fast"\ + "september"\ + "okt\u00f3ber"\ + "n\u00f3vember"\ + "desember"\ + ""] + ::msgcat::mcset is DATE_FORMAT "%e.%m.%Y" + ::msgcat::mcset is TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset is DATE_TIME_FORMAT "%e.%m.%Y %H:%M:%S %z" +} diff --git a/library/msgs/it.msg b/library/msgs/it.msg new file mode 100755 index 0000000..b641cde --- /dev/null +++ b/library/msgs/it.msg @@ -0,0 +1,54 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset it DAYS_OF_WEEK_ABBREV [list \ + "dom"\ + "lun"\ + "mar"\ + "mer"\ + "gio"\ + "ven"\ + "sab"] + ::msgcat::mcset it DAYS_OF_WEEK_FULL [list \ + "domenica"\ + "luned\u00ec"\ + "marted\u00ec"\ + "mercoled\u00ec"\ + "gioved\u00ec"\ + "venerd\u00ec"\ + "sabato"] + ::msgcat::mcset it MONTHS_ABBREV [list \ + "gen"\ + "feb"\ + "mar"\ + "apr"\ + "mag"\ + "giu"\ + "lug"\ + "ago"\ + "set"\ + "ott"\ + "nov"\ + "dic"\ + ""] + ::msgcat::mcset it MONTHS_FULL [list \ + "gennaio"\ + "febbraio"\ + "marzo"\ + "aprile"\ + "maggio"\ + "giugno"\ + "luglio"\ + "agosto"\ + "settembre"\ + "ottobre"\ + "novembre"\ + "dicembre"\ + ""] + ::msgcat::mcset it BCE "aC" + ::msgcat::mcset it CE "dC" + ::msgcat::mcset it AM "m." + ::msgcat::mcset it PM "p." + ::msgcat::mcset it DATE_FORMAT "%d %B %Y" + ::msgcat::mcset it TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset it DATE_TIME_FORMAT "%d %B %Y %H:%M:%S %z" +} diff --git a/library/msgs/it_CH.msg b/library/msgs/it_CH.msg new file mode 100755 index 0000000..b36ed36 --- /dev/null +++ b/library/msgs/it_CH.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset it_CH DATE_FORMAT "%e. %B %Y" + ::msgcat::mcset it_CH TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset it_CH DATE_TIME_FORMAT "%e. %B %Y %H:%M:%S %z" +} diff --git a/library/msgs/ja.msg b/library/msgs/ja.msg new file mode 100755 index 0000000..7bab236 --- /dev/null +++ b/library/msgs/ja.msg @@ -0,0 +1,59 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ja DAYS_OF_WEEK_ABBREV [list \ + "\u65e5"\ + "\u6708"\ + "\u706b"\ + "\u6c34"\ + "\u6728"\ + "\u91d1"\ + "\u571f"] + ::msgcat::mcset ja DAYS_OF_WEEK_FULL [list \ + "\u65e5\u66dc\u65e5"\ + "\u6708\u66dc\u65e5"\ + "\u706b\u66dc\u65e5"\ + "\u6c34\u66dc\u65e5"\ + "\u6728\u66dc\u65e5"\ + "\u91d1\u66dc\u65e5"\ + "\u571f\u66dc\u65e5"] + ::msgcat::mcset ja MONTHS_ABBREV [list \ + "1"\ + "2"\ + "3"\ + "4"\ + "5"\ + "6"\ + "7"\ + "8"\ + "9"\ + "10"\ + "11"\ + "12"\ + ""] + ::msgcat::mcset ja MONTHS_FULL [list \ + "1\u6708"\ + "2\u6708"\ + "3\u6708"\ + "4\u6708"\ + "5\u6708"\ + "6\u6708"\ + "7\u6708"\ + "8\u6708"\ + "9\u6708"\ + "10\u6708"\ + "11\u6708"\ + "12\u6708"\ + ""] + ::msgcat::mcset ja BCE "\u7d00\u5143\u524d" + ::msgcat::mcset ja CE "\u897f\u66a6" + ::msgcat::mcset ja AM "\u5348\u524d" + ::msgcat::mcset ja PM "\u5348\u5f8c" + ::msgcat::mcset ja DATE_FORMAT "%Y/%m/%d" + ::msgcat::mcset ja TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset ja DATE_TIME_FORMAT "%Y/%m/%d %k:%M:%S %z" + ::msgcat::mcset ja LOCALE_NUMERALS "\u3007 \u4e00 \u4e8c \u4e09 \u56db \u4e94 \u516d \u4e03 \u516b \u4e5d \u5341 \u5341\u4e00 \u5341\u4e8c \u5341\u4e09 \u5341\u56db \u5341\u4e94 \u5341\u516d \u5341\u4e03 \u5341\u516b \u5341\u4e5d \u4e8c\u5341 \u5eff\u4e00 \u5eff\u4e8c \u5eff\u4e09 \u5eff\u56db \u5eff\u4e94 \u5eff\u516d \u5eff\u4e03 \u5eff\u516b \u5eff\u4e5d \u4e09\u5341 \u5345\u4e00 \u5345\u4e8c \u5345\u4e09 \u5345\u56db \u5345\u4e94 \u5345\u516d \u5345\u4e03 \u5345\u516b \u5345\u4e5d \u56db\u5341 \u56db\u5341\u4e00 \u56db\u5341\u4e8c \u56db\u5341\u4e09 \u56db\u5341\u56db \u56db\u5341\u4e94 \u56db\u5341\u516d \u56db\u5341\u4e03 \u56db\u5341\u516b \u56db\u5341\u4e5d \u4e94\u5341 \u4e94\u5341\u4e00 \u4e94\u5341\u4e8c \u4e94\u5341\u4e09 \u4e94\u5341\u56db \u4e94\u5341\u4e94 \u4e94\u5341\u516d \u4e94\u5341\u4e03 \u4e94\u5341\u516b \u4e94\u5341\u4e5d \u516d\u5341 \u516d\u5341\u4e00 \u516d\u5341\u4e8c \u516d\u5341\u4e09 \u516d\u5341\u56db \u516d\u5341\u4e94 \u516d\u5341\u516d \u516d\u5341\u4e03 \u516d\u5341\u516b \u516d\u5341\u4e5d \u4e03\u5341 \u4e03\u5341\u4e00 \u4e03\u5341\u4e8c \u4e03\u5341\u4e09 \u4e03\u5341\u56db \u4e03\u5341\u4e94 \u4e03\u5341\u516d \u4e03\u5341\u4e03 \u4e03\u5341\u516b \u4e03\u5341\u4e5d \u516b\u5341 \u516b\u5341\u4e00 \u516b\u5341\u4e8c \u516b\u5341\u4e09 \u516b\u5341\u56db \u516b\u5341\u4e94 \u516b\u5341\u516d \u516b\u5341\u4e03 \u516b\u5341\u516b \u516b\u5341\u4e5d \u4e5d\u5341 \u4e5d\u5341\u4e00 \u4e5d\u5341\u4e8c \u4e5d\u5341\u4e09 \u4e5d\u5341\u56db \u4e5d\u5341\u4e94 \u4e5d\u5341\u516d \u4e5d\u5341\u4e03 \u4e5d\u5341\u516b \u4e5d\u5341\u4e5d" + ::msgcat::mcset ja LOCALE_DATE_FORMAT "%EY\u5e74%B%Od\u65e5" + ::msgcat::mcset ja LOCALE_TIME_FORMAT "%OH\u6642%OM\u5206%OS\u79d2" + ::msgcat::mcset ja LOCALE_DATE_TIME_FORMAT "%A %EY\u5e74%B%Od\u65e5%OH\u6642%OM\u5206%OS\u79d2 %z" + ::msgcat::mcset ja LOCALE_ERAS "\u007b-9223372036854775808 \u897f\u66a6 0\u007d \u007b-3060979200 \u660e\u6cbb 1867\u007d \u007b-1812153600 \u5927\u6b63 1911\u007d \u007b-1357603200 \u662d\u548c 1925\u007d \u007b568512000 \u5e73\u6210 1987\u007d" +} diff --git a/library/msgs/kl.msg b/library/msgs/kl.msg new file mode 100755 index 0000000..d877bfe --- /dev/null +++ b/library/msgs/kl.msg @@ -0,0 +1,47 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset kl DAYS_OF_WEEK_ABBREV [list \ + "sab"\ + "ata"\ + "mar"\ + "pin"\ + "sis"\ + "tal"\ + "arf"] + ::msgcat::mcset kl DAYS_OF_WEEK_FULL [list \ + "sabaat"\ + "ataasinngorneq"\ + "marlunngorneq"\ + "pingasunngorneq"\ + "sisamanngorneq"\ + "tallimanngorneq"\ + "arfininngorneq"] + ::msgcat::mcset kl MONTHS_ABBREV [list \ + "jan"\ + "feb"\ + "mar"\ + "apr"\ + "maj"\ + "jun"\ + "jul"\ + "aug"\ + "sep"\ + "okt"\ + "nov"\ + "dec"\ + ""] + ::msgcat::mcset kl MONTHS_FULL [list \ + "januari"\ + "februari"\ + "martsi"\ + "aprili"\ + "maji"\ + "juni"\ + "juli"\ + "augustusi"\ + "septemberi"\ + "oktoberi"\ + "novemberi"\ + "decemberi"\ + ""] +} diff --git a/library/msgs/kl_GL.msg b/library/msgs/kl_GL.msg new file mode 100755 index 0000000..403aa10 --- /dev/null +++ b/library/msgs/kl_GL.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset kl_GL DATE_FORMAT "%d %b %Y" + ::msgcat::mcset kl_GL TIME_FORMAT "%T" + ::msgcat::mcset kl_GL TIME_FORMAT_12 "%T" + ::msgcat::mcset kl_GL DATE_TIME_FORMAT "%a %d %b %Y %T %z" +} diff --git a/library/msgs/ko.msg b/library/msgs/ko.msg new file mode 100755 index 0000000..0cd17a1 --- /dev/null +++ b/library/msgs/ko.msg @@ -0,0 +1,55 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ko DAYS_OF_WEEK_ABBREV [list \ + "\uc77c"\ + "\uc6d4"\ + "\ud654"\ + "\uc218"\ + "\ubaa9"\ + "\uae08"\ + "\ud1a0"] + ::msgcat::mcset ko DAYS_OF_WEEK_FULL [list \ + "\uc77c\uc694\uc77c"\ + "\uc6d4\uc694\uc77c"\ + "\ud654\uc694\uc77c"\ + "\uc218\uc694\uc77c"\ + "\ubaa9\uc694\uc77c"\ + "\uae08\uc694\uc77c"\ + "\ud1a0\uc694\uc77c"] + ::msgcat::mcset ko MONTHS_ABBREV [list \ + "1\uc6d4"\ + "2\uc6d4"\ + "3\uc6d4"\ + "4\uc6d4"\ + "5\uc6d4"\ + "6\uc6d4"\ + "7\uc6d4"\ + "8\uc6d4"\ + "9\uc6d4"\ + "10\uc6d4"\ + "11\uc6d4"\ + "12\uc6d4"\ + ""] + ::msgcat::mcset ko MONTHS_FULL [list \ + "1\uc6d4"\ + "2\uc6d4"\ + "3\uc6d4"\ + "4\uc6d4"\ + "5\uc6d4"\ + "6\uc6d4"\ + "7\uc6d4"\ + "8\uc6d4"\ + "9\uc6d4"\ + "10\uc6d4"\ + "11\uc6d4"\ + "12\uc6d4"\ + ""] + ::msgcat::mcset ko AM "\uc624\uc804" + ::msgcat::mcset ko PM "\uc624\ud6c4" + ::msgcat::mcset ko DATE_FORMAT "%Y-%m-%d" + ::msgcat::mcset ko TIME_FORMAT_12 "%P %l:%M:%S" + ::msgcat::mcset ko DATE_TIME_FORMAT "%Y-%m-%d %P %l:%M:%S %z" + ::msgcat::mcset ko LOCALE_DATE_FORMAT "%Y\ub144%B%Od\uc77c" + ::msgcat::mcset ko LOCALE_TIME_FORMAT "%H\uc2dc%M\ubd84%S\ucd08" + ::msgcat::mcset ko LOCALE_DATE_TIME_FORMAT "%A %Y\ub144%B%Od\uc77c%H\uc2dc%M\ubd84%S\ucd08 %z" +} diff --git a/library/msgs/ko_KR.msg b/library/msgs/ko_KR.msg new file mode 100755 index 0000000..ea5bbd7 --- /dev/null +++ b/library/msgs/ko_KR.msg @@ -0,0 +1,8 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ko_KR BCE "\uae30\uc6d0\uc804" + ::msgcat::mcset ko_KR CE "\uc11c\uae30" + ::msgcat::mcset ko_KR DATE_FORMAT "%Y.%m.%d" + ::msgcat::mcset ko_KR TIME_FORMAT_12 "%P %l:%M:%S" + ::msgcat::mcset ko_KR DATE_TIME_FORMAT "%Y.%m.%d %P %l:%M:%S %z" +} diff --git a/library/msgs/kok.msg b/library/msgs/kok.msg new file mode 100755 index 0000000..0869f20 --- /dev/null +++ b/library/msgs/kok.msg @@ -0,0 +1,39 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset kok DAYS_OF_WEEK_FULL [list \ + "\u0906\u0926\u093f\u0924\u094d\u092f\u0935\u093e\u0930"\ + "\u0938\u094b\u092e\u0935\u093e\u0930"\ + "\u092e\u0902\u0917\u0933\u093e\u0930"\ + "\u092c\u0941\u0927\u0935\u093e\u0930"\ + "\u0917\u0941\u0930\u0941\u0935\u093e\u0930"\ + "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930"\ + "\u0936\u0928\u093f\u0935\u093e\u0930"] + ::msgcat::mcset kok MONTHS_ABBREV [list \ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940"\ + "\u092b\u0947\u092c\u0943\u0935\u093e\u0930\u0940"\ + "\u092e\u093e\u0930\u094d\u091a"\ + "\u090f\u092a\u094d\u0930\u093f\u0932"\ + "\u092e\u0947"\ + "\u091c\u0942\u0928"\ + "\u091c\u0941\u0932\u0948"\ + "\u0913\u0917\u0938\u094d\u091f"\ + "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930"\ + "\u0913\u0915\u094d\u091f\u094b\u092c\u0930"\ + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930"\ + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930"] + ::msgcat::mcset kok MONTHS_FULL [list \ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940"\ + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940"\ + "\u092e\u093e\u0930\u094d\u091a"\ + "\u090f\u092a\u094d\u0930\u093f\u0932"\ + "\u092e\u0947"\ + "\u091c\u0942\u0928"\ + "\u091c\u0941\u0932\u0948"\ + "\u0913\u0917\u0938\u094d\u091f"\ + "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930"\ + "\u0913\u0915\u094d\u091f\u094b\u092c\u0930"\ + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930"\ + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930"] + ::msgcat::mcset kok AM "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u092a\u0942\u0930\u094d\u0935" + ::msgcat::mcset kok PM "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u0936\u0916\u093e" +} diff --git a/library/msgs/kok_IN.msg b/library/msgs/kok_IN.msg new file mode 100755 index 0000000..abcb1ff --- /dev/null +++ b/library/msgs/kok_IN.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset kok_IN DATE_FORMAT "%d %M %Y" + ::msgcat::mcset kok_IN TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset kok_IN DATE_TIME_FORMAT "%d %M %Y %I:%M:%S %P %z" +} diff --git a/library/msgs/kw.msg b/library/msgs/kw.msg new file mode 100755 index 0000000..aaf79b3 --- /dev/null +++ b/library/msgs/kw.msg @@ -0,0 +1,47 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset kw DAYS_OF_WEEK_ABBREV [list \ + "Sul"\ + "Lun"\ + "Mth"\ + "Mhr"\ + "Yow"\ + "Gwe"\ + "Sad"] + ::msgcat::mcset kw DAYS_OF_WEEK_FULL [list \ + "De Sul"\ + "De Lun"\ + "De Merth"\ + "De Merher"\ + "De Yow"\ + "De Gwener"\ + "De Sadorn"] + ::msgcat::mcset kw MONTHS_ABBREV [list \ + "Gen"\ + "Whe"\ + "Mer"\ + "Ebr"\ + "Me"\ + "Evn"\ + "Gor"\ + "Est"\ + "Gwn"\ + "Hed"\ + "Du"\ + "Kev"\ + ""] + ::msgcat::mcset kw MONTHS_FULL [list \ + "Mys Genver"\ + "Mys Whevrel"\ + "Mys Merth"\ + "Mys Ebrel"\ + "Mys Me"\ + "Mys Evan"\ + "Mys Gortheren"\ + "Mye Est"\ + "Mys Gwyngala"\ + "Mys Hedra"\ + "Mys Du"\ + "Mys Kevardhu"\ + ""] +} diff --git a/library/msgs/kw_GB.msg b/library/msgs/kw_GB.msg new file mode 100755 index 0000000..2967680 --- /dev/null +++ b/library/msgs/kw_GB.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset kw_GB DATE_FORMAT "%d %B %Y" + ::msgcat::mcset kw_GB TIME_FORMAT_12 "%l:%M:%S %P" + ::msgcat::mcset kw_GB DATE_TIME_FORMAT "%d %B %Y %l:%M:%S %P %z" +} diff --git a/library/msgs/lt.msg b/library/msgs/lt.msg new file mode 100755 index 0000000..27b0985 --- /dev/null +++ b/library/msgs/lt.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset lt DAYS_OF_WEEK_ABBREV [list \ + "Sk"\ + "Pr"\ + "An"\ + "Tr"\ + "Kt"\ + "Pn"\ + "\u0160t"] + ::msgcat::mcset lt DAYS_OF_WEEK_FULL [list \ + "Sekmadienis"\ + "Pirmadienis"\ + "Antradienis"\ + "Tre\u010diadienis"\ + "Ketvirtadienis"\ + "Penktadienis"\ + "\u0160e\u0161tadienis"] + ::msgcat::mcset lt MONTHS_ABBREV [list \ + "Sau"\ + "Vas"\ + "Kov"\ + "Bal"\ + "Geg"\ + "Bir"\ + "Lie"\ + "Rgp"\ + "Rgs"\ + "Spa"\ + "Lap"\ + "Grd"\ + ""] + ::msgcat::mcset lt MONTHS_FULL [list \ + "Sausio"\ + "Vasario"\ + "Kovo"\ + "Baland\u017eio"\ + "Gegu\u017e\u0117s"\ + "Bir\u017eelio"\ + "Liepos"\ + "Rugpj\u016b\u010dio"\ + "Rugs\u0117jo"\ + "Spalio"\ + "Lapkri\u010dio"\ + "Gruod\u017eio"\ + ""] + ::msgcat::mcset lt BCE "pr.Kr." + ::msgcat::mcset lt CE "po.Kr." + ::msgcat::mcset lt DATE_FORMAT "%Y.%m.%e" + ::msgcat::mcset lt TIME_FORMAT "%H.%M.%S" + ::msgcat::mcset lt DATE_TIME_FORMAT "%Y.%m.%e %H.%M.%S %z" +} diff --git a/library/msgs/lv.msg b/library/msgs/lv.msg new file mode 100755 index 0000000..a037b15 --- /dev/null +++ b/library/msgs/lv.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset lv DAYS_OF_WEEK_ABBREV [list \ + "Sv"\ + "P"\ + "O"\ + "T"\ + "C"\ + "Pk"\ + "S"] + ::msgcat::mcset lv DAYS_OF_WEEK_FULL [list \ + "sv\u0113tdiena"\ + "pirmdiena"\ + "otrdiena"\ + "tre\u0161diena"\ + "ceturdien"\ + "piektdiena"\ + "sestdiena"] + ::msgcat::mcset lv MONTHS_ABBREV [list \ + "Jan"\ + "Feb"\ + "Mar"\ + "Apr"\ + "Maijs"\ + "J\u016bn"\ + "J\u016bl"\ + "Aug"\ + "Sep"\ + "Okt"\ + "Nov"\ + "Dec"\ + ""] + ::msgcat::mcset lv MONTHS_FULL [list \ + "janv\u0101ris"\ + "febru\u0101ris"\ + "marts"\ + "apr\u012blis"\ + "maijs"\ + "j\u016bnijs"\ + "j\u016blijs"\ + "augusts"\ + "septembris"\ + "oktobris"\ + "novembris"\ + "decembris"\ + ""] + ::msgcat::mcset lv BCE "pm\u0113" + ::msgcat::mcset lv CE "m\u0113" + ::msgcat::mcset lv DATE_FORMAT "%Y.%e.%m" + ::msgcat::mcset lv TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset lv DATE_TIME_FORMAT "%Y.%e.%m %H:%M:%S %z" +} diff --git a/library/msgs/mk.msg b/library/msgs/mk.msg new file mode 100755 index 0000000..41cf60d --- /dev/null +++ b/library/msgs/mk.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset mk DAYS_OF_WEEK_ABBREV [list \ + "\u043d\u0435\u0434."\ + "\u043f\u043e\u043d."\ + "\u0432\u0442."\ + "\u0441\u0440\u0435."\ + "\u0447\u0435\u0442."\ + "\u043f\u0435\u0442."\ + "\u0441\u0430\u0431."] + ::msgcat::mcset mk DAYS_OF_WEEK_FULL [list \ + "\u043d\u0435\u0434\u0435\u043b\u0430"\ + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a"\ + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a"\ + "\u0441\u0440\u0435\u0434\u0430"\ + "\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a"\ + "\u043f\u0435\u0442\u043e\u043a"\ + "\u0441\u0430\u0431\u043e\u0442\u0430"] + ::msgcat::mcset mk MONTHS_ABBREV [list \ + "\u0458\u0430\u043d."\ + "\u0444\u0435\u0432."\ + "\u043c\u0430\u0440."\ + "\u0430\u043f\u0440."\ + "\u043c\u0430\u0458."\ + "\u0458\u0443\u043d."\ + "\u0458\u0443\u043b."\ + "\u0430\u0432\u0433."\ + "\u0441\u0435\u043f\u0442."\ + "\u043e\u043a\u0442."\ + "\u043d\u043e\u0435\u043c."\ + "\u0434\u0435\u043a\u0435\u043c."\ + ""] + ::msgcat::mcset mk MONTHS_FULL [list \ + "\u0458\u0430\u043d\u0443\u0430\u0440\u0438"\ + "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438"\ + "\u043c\u0430\u0440\u0442"\ + "\u0430\u043f\u0440\u0438\u043b"\ + "\u043c\u0430\u0458"\ + "\u0458\u0443\u043d\u0438"\ + "\u0458\u0443\u043b\u0438"\ + "\u0430\u0432\u0433\u0443\u0441\u0442"\ + "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438"\ + "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438"\ + "\u043d\u043e\u0435\u043c\u0432\u0440\u0438"\ + "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438"\ + ""] + ::msgcat::mcset mk BCE "\u043f\u0440.\u043d.\u0435." + ::msgcat::mcset mk CE "\u0430\u0435." + ::msgcat::mcset mk DATE_FORMAT "%e.%m.%Y" + ::msgcat::mcset mk TIME_FORMAT "%H:%M:%S %z" + ::msgcat::mcset mk DATE_TIME_FORMAT "%e.%m.%Y %H:%M:%S %z %z" +} diff --git a/library/msgs/mr.msg b/library/msgs/mr.msg new file mode 100755 index 0000000..cea427a --- /dev/null +++ b/library/msgs/mr.msg @@ -0,0 +1,39 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset mr DAYS_OF_WEEK_FULL [list \ + "\u0930\u0935\u093f\u0935\u093e\u0930"\ + "\u0938\u094b\u092e\u0935\u093e\u0930"\ + "\u092e\u0902\u0917\u0933\u0935\u093e\u0930"\ + "\u092e\u0902\u0917\u0933\u0935\u093e\u0930"\ + "\u0917\u0941\u0930\u0941\u0935\u093e\u0930"\ + "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930"\ + "\u0936\u0928\u093f\u0935\u093e\u0930"] + ::msgcat::mcset mr MONTHS_ABBREV [list \ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940"\ + "\u092b\u0947\u092c\u0943\u0935\u093e\u0930\u0940"\ + "\u092e\u093e\u0930\u094d\u091a"\ + "\u090f\u092a\u094d\u0930\u093f\u0932"\ + "\u092e\u0947"\ + "\u091c\u0942\u0928"\ + "\u091c\u0941\u0932\u0948"\ + "\u0913\u0917\u0938\u094d\u091f"\ + "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930"\ + "\u0913\u0915\u094d\u091f\u094b\u092c\u0930"\ + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930"\ + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930"] + ::msgcat::mcset mr MONTHS_FULL [list \ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940"\ + "\u092b\u0947\u092c\u0943\u0935\u093e\u0930\u0940"\ + "\u092e\u093e\u0930\u094d\u091a"\ + "\u090f\u092a\u094d\u0930\u093f\u0932"\ + "\u092e\u0947"\ + "\u091c\u0942\u0928"\ + "\u091c\u0941\u0932\u0948"\ + "\u0913\u0917\u0938\u094d\u091f"\ + "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930"\ + "\u0913\u0915\u094d\u091f\u094b\u092c\u0930"\ + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930"\ + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930"] + ::msgcat::mcset mr AM "BC" + ::msgcat::mcset mr PM "AD" +} diff --git a/library/msgs/mr_IN.msg b/library/msgs/mr_IN.msg new file mode 100755 index 0000000..1889da5 --- /dev/null +++ b/library/msgs/mr_IN.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset mr_IN DATE_FORMAT "%d %M %Y" + ::msgcat::mcset mr_IN TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset mr_IN DATE_TIME_FORMAT "%d %M %Y %I:%M:%S %P %z" +} diff --git a/library/msgs/ms.msg b/library/msgs/ms.msg new file mode 100755 index 0000000..e954431 --- /dev/null +++ b/library/msgs/ms.msg @@ -0,0 +1,47 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ms DAYS_OF_WEEK_ABBREV [list \ + "Aha"\ + "Isn"\ + "Sei"\ + "Rab"\ + "Kha"\ + "Jum"\ + "Sab"] + ::msgcat::mcset ms DAYS_OF_WEEK_FULL [list \ + "Ahad"\ + "Isnin"\ + "Selasa"\ + "Rahu"\ + "Khamis"\ + "Jumaat"\ + "Sabtu"] + ::msgcat::mcset ms MONTHS_ABBREV [list \ + "Jan"\ + "Feb"\ + "Mac"\ + "Apr"\ + "Mei"\ + "Jun"\ + "Jul"\ + "Ogos"\ + "Sep"\ + "Okt"\ + "Nov"\ + "Dis"\ + ""] + ::msgcat::mcset ms MONTHS_FULL [list \ + "Januari"\ + "Februari"\ + "Mac"\ + "April"\ + "Mei"\ + "Jun"\ + "Julai"\ + "Ogos"\ + "September"\ + "Oktober"\ + "November"\ + "Disember"\ + ""] +} diff --git a/library/msgs/ms_MY.msg b/library/msgs/ms_MY.msg new file mode 100755 index 0000000..c1f93d4 --- /dev/null +++ b/library/msgs/ms_MY.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ms_MY DATE_FORMAT "%A %d %b %Y" + ::msgcat::mcset ms_MY TIME_FORMAT_12 "%I:%M:%S %z" + ::msgcat::mcset ms_MY DATE_TIME_FORMAT "%A %d %b %Y %I:%M:%S %z %z" +} diff --git a/library/msgs/mt.msg b/library/msgs/mt.msg new file mode 100755 index 0000000..ddd5446 --- /dev/null +++ b/library/msgs/mt.msg @@ -0,0 +1,27 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset mt DAYS_OF_WEEK_ABBREV [list \ + "\u0126ad"\ + "Tne"\ + "Tli"\ + "Erb"\ + "\u0126am"\ + "\u0120im"] + ::msgcat::mcset mt MONTHS_ABBREV [list \ + "Jan"\ + "Fra"\ + "Mar"\ + "Apr"\ + "Mej"\ + "\u0120un"\ + "Lul"\ + "Awi"\ + "Set"\ + "Ott"\ + "Nov"] + ::msgcat::mcset mt BCE "QK" + ::msgcat::mcset mt CE "" + ::msgcat::mcset mt DATE_FORMAT "%A, %e ta %B, %Y" + ::msgcat::mcset mt TIME_FORMAT_12 "%l:%M:%S %P" + ::msgcat::mcset mt DATE_TIME_FORMAT "%A, %e ta %B, %Y %l:%M:%S %P %z" +} diff --git a/library/msgs/nb.msg b/library/msgs/nb.msg new file mode 100755 index 0000000..90d49a3 --- /dev/null +++ b/library/msgs/nb.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset nb DAYS_OF_WEEK_ABBREV [list \ + "s\u00f8"\ + "ma"\ + "ti"\ + "on"\ + "to"\ + "fr"\ + "l\u00f8"] + ::msgcat::mcset nb DAYS_OF_WEEK_FULL [list \ + "s\u00f8ndag"\ + "mandag"\ + "tirsdag"\ + "onsdag"\ + "torsdag"\ + "fredag"\ + "l\u00f8rdag"] + ::msgcat::mcset nb MONTHS_ABBREV [list \ + "jan"\ + "feb"\ + "mar"\ + "apr"\ + "mai"\ + "jun"\ + "jul"\ + "aug"\ + "sep"\ + "okt"\ + "nov"\ + "des"\ + ""] + ::msgcat::mcset nb MONTHS_FULL [list \ + "januar"\ + "februar"\ + "mars"\ + "april"\ + "mai"\ + "juni"\ + "juli"\ + "august"\ + "september"\ + "oktober"\ + "november"\ + "desember"\ + ""] + ::msgcat::mcset nb BCE "f.Kr." + ::msgcat::mcset nb CE "e.Kr." + ::msgcat::mcset nb DATE_FORMAT "%e. %B %Y" + ::msgcat::mcset nb TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset nb DATE_TIME_FORMAT "%e. %B %Y %H:%M:%S %z" +} diff --git a/library/msgs/nl.msg b/library/msgs/nl.msg new file mode 100755 index 0000000..4c5c675 --- /dev/null +++ b/library/msgs/nl.msg @@ -0,0 +1,50 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset nl DAYS_OF_WEEK_ABBREV [list \ + "zo"\ + "ma"\ + "di"\ + "wo"\ + "do"\ + "vr"\ + "za"] + ::msgcat::mcset nl DAYS_OF_WEEK_FULL [list \ + "zondag"\ + "maandag"\ + "dinsdag"\ + "woensdag"\ + "donderdag"\ + "vrijdag"\ + "zaterdag"] + ::msgcat::mcset nl MONTHS_ABBREV [list \ + "jan"\ + "feb"\ + "mrt"\ + "apr"\ + "mei"\ + "jun"\ + "jul"\ + "aug"\ + "sep"\ + "okt"\ + "nov"\ + "dec"\ + ""] + ::msgcat::mcset nl MONTHS_FULL [list \ + "januari"\ + "februari"\ + "maart"\ + "april"\ + "mei"\ + "juni"\ + "juli"\ + "augustus"\ + "september"\ + "oktober"\ + "november"\ + "december"\ + ""] + ::msgcat::mcset nl DATE_FORMAT "%e %B %Y" + ::msgcat::mcset nl TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset nl DATE_TIME_FORMAT "%e %B %Y %k:%M:%S %z" +} diff --git a/library/msgs/nl_BE.msg b/library/msgs/nl_BE.msg new file mode 100755 index 0000000..4b19670 --- /dev/null +++ b/library/msgs/nl_BE.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset nl_BE DATE_FORMAT "%d-%m-%y" + ::msgcat::mcset nl_BE TIME_FORMAT "%T" + ::msgcat::mcset nl_BE TIME_FORMAT_12 "%T" + ::msgcat::mcset nl_BE DATE_TIME_FORMAT "%a %d %b %Y %T %z" +} diff --git a/library/msgs/nn.msg b/library/msgs/nn.msg new file mode 100755 index 0000000..bd61ac9 --- /dev/null +++ b/library/msgs/nn.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset nn DAYS_OF_WEEK_ABBREV [list \ + "su"\ + "m\u00e5"\ + "ty"\ + "on"\ + "to"\ + "fr"\ + "lau"] + ::msgcat::mcset nn DAYS_OF_WEEK_FULL [list \ + "sundag"\ + "m\u00e5ndag"\ + "tysdag"\ + "onsdag"\ + "torsdag"\ + "fredag"\ + "laurdag"] + ::msgcat::mcset nn MONTHS_ABBREV [list \ + "jan"\ + "feb"\ + "mar"\ + "apr"\ + "mai"\ + "jun"\ + "jul"\ + "aug"\ + "sep"\ + "okt"\ + "nov"\ + "des"\ + ""] + ::msgcat::mcset nn MONTHS_FULL [list \ + "januar"\ + "februar"\ + "mars"\ + "april"\ + "mai"\ + "juni"\ + "juli"\ + "august"\ + "september"\ + "oktober"\ + "november"\ + "desember"\ + ""] + ::msgcat::mcset nn BCE "f.Kr." + ::msgcat::mcset nn CE "e.Kr." + ::msgcat::mcset nn DATE_FORMAT "%e. %B %Y" + ::msgcat::mcset nn TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset nn DATE_TIME_FORMAT "%e. %B %Y %H:%M:%S %z" +} diff --git a/library/msgs/pl.msg b/library/msgs/pl.msg new file mode 100755 index 0000000..d206f4b --- /dev/null +++ b/library/msgs/pl.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset pl DAYS_OF_WEEK_ABBREV [list \ + "N"\ + "Pn"\ + "Wt"\ + "\u015ar"\ + "Cz"\ + "Pt"\ + "So"] + ::msgcat::mcset pl DAYS_OF_WEEK_FULL [list \ + "niedziela"\ + "poniedzia\u0142ek"\ + "wtorek"\ + "\u015broda"\ + "czwartek"\ + "pi\u0105tek"\ + "sobota"] + ::msgcat::mcset pl MONTHS_ABBREV [list \ + "sty"\ + "lut"\ + "mar"\ + "kwi"\ + "maj"\ + "cze"\ + "lip"\ + "sie"\ + "wrz"\ + "pa\u017a"\ + "lis"\ + "gru"\ + ""] + ::msgcat::mcset pl MONTHS_FULL [list \ + "stycze\u0144"\ + "luty"\ + "marzec"\ + "kwiecie\u0144"\ + "maj"\ + "czerwiec"\ + "lipiec"\ + "sierpie\u0144"\ + "wrzesie\u0144"\ + "pa\u017adziernik"\ + "listopad"\ + "grudzie\u0144"\ + ""] + ::msgcat::mcset pl BCE "p.n.e." + ::msgcat::mcset pl CE "n.e." + ::msgcat::mcset pl DATE_FORMAT "%Y-%m-%d" + ::msgcat::mcset pl TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset pl DATE_TIME_FORMAT "%Y-%m-%d %H:%M:%S %z" +} diff --git a/library/msgs/pt.msg b/library/msgs/pt.msg new file mode 100755 index 0000000..96fdb35 --- /dev/null +++ b/library/msgs/pt.msg @@ -0,0 +1,50 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset pt DAYS_OF_WEEK_ABBREV [list \ + "Dom"\ + "Seg"\ + "Ter"\ + "Qua"\ + "Qui"\ + "Sex"\ + "S\u00e1b"] + ::msgcat::mcset pt DAYS_OF_WEEK_FULL [list \ + "Domingo"\ + "Segunda-feira"\ + "Ter\u00e7a-feira"\ + "Quarta-feira"\ + "Quinta-feira"\ + "Sexta-feira"\ + "S\u00e1bado"] + ::msgcat::mcset pt MONTHS_ABBREV [list \ + "Jan"\ + "Fev"\ + "Mar"\ + "Abr"\ + "Mai"\ + "Jun"\ + "Jul"\ + "Ago"\ + "Set"\ + "Out"\ + "Nov"\ + "Dez"\ + ""] + ::msgcat::mcset pt MONTHS_FULL [list \ + "Janeiro"\ + "Fevereiro"\ + "Mar\u00e7o"\ + "Abril"\ + "Maio"\ + "Junho"\ + "Julho"\ + "Agosto"\ + "Setembro"\ + "Outubro"\ + "Novembro"\ + "Dezembro"\ + ""] + ::msgcat::mcset pt DATE_FORMAT "%d-%m-%Y" + ::msgcat::mcset pt TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset pt DATE_TIME_FORMAT "%d-%m-%Y %k:%M:%S %z" +} diff --git a/library/msgs/pt_BR.msg b/library/msgs/pt_BR.msg new file mode 100755 index 0000000..8684327 --- /dev/null +++ b/library/msgs/pt_BR.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset pt_BR DATE_FORMAT "%d-%m-%Y" + ::msgcat::mcset pt_BR TIME_FORMAT "%T" + ::msgcat::mcset pt_BR TIME_FORMAT_12 "%T" + ::msgcat::mcset pt_BR DATE_TIME_FORMAT "%a %d %b %Y %T %z" +} diff --git a/library/msgs/ro.msg b/library/msgs/ro.msg new file mode 100755 index 0000000..bdd7c61 --- /dev/null +++ b/library/msgs/ro.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ro DAYS_OF_WEEK_ABBREV [list \ + "D"\ + "L"\ + "Ma"\ + "Mi"\ + "J"\ + "V"\ + "S"] + ::msgcat::mcset ro DAYS_OF_WEEK_FULL [list \ + "duminic\u0103"\ + "luni"\ + "mar\u0163i"\ + "miercuri"\ + "joi"\ + "vineri"\ + "s\u00eemb\u0103t\u0103"] + ::msgcat::mcset ro MONTHS_ABBREV [list \ + "Ian"\ + "Feb"\ + "Mar"\ + "Apr"\ + "Mai"\ + "Iun"\ + "Iul"\ + "Aug"\ + "Sep"\ + "Oct"\ + "Nov"\ + "Dec"\ + ""] + ::msgcat::mcset ro MONTHS_FULL [list \ + "ianuarie"\ + "februarie"\ + "martie"\ + "aprilie"\ + "mai"\ + "iunie"\ + "iulie"\ + "august"\ + "septembrie"\ + "octombrie"\ + "noiembrie"\ + "decembrie"\ + ""] + ::msgcat::mcset ro BCE "d.C." + ::msgcat::mcset ro CE "\u00ee.d.C." + ::msgcat::mcset ro DATE_FORMAT "%d.%m.%Y" + ::msgcat::mcset ro TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset ro DATE_TIME_FORMAT "%d.%m.%Y %H:%M:%S %z" +} diff --git a/library/msgs/ru.msg b/library/msgs/ru.msg new file mode 100755 index 0000000..65b075d --- /dev/null +++ b/library/msgs/ru.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ru DAYS_OF_WEEK_ABBREV [list \ + "\u0412\u0441"\ + "\u041f\u043d"\ + "\u0412\u0442"\ + "\u0421\u0440"\ + "\u0427\u0442"\ + "\u041f\u0442"\ + "\u0421\u0431"] + ::msgcat::mcset ru DAYS_OF_WEEK_FULL [list \ + "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435"\ + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a"\ + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a"\ + "\u0441\u0440\u0435\u0434\u0430"\ + "\u0447\u0435\u0442\u0432\u0435\u0440\u0433"\ + "\u043f\u044f\u0442\u043d\u0438\u0446\u0430"\ + "\u0441\u0443\u0431\u0431\u043e\u0442\u0430"] + ::msgcat::mcset ru MONTHS_ABBREV [list \ + "\u044f\u043d\u0432"\ + "\u0444\u0435\u0432"\ + "\u043c\u0430\u0440"\ + "\u0430\u043f\u0440"\ + "\u043c\u0430\u0439"\ + "\u0438\u044e\u043d"\ + "\u0438\u044e\u043b"\ + "\u0430\u0432\u0433"\ + "\u0441\u0435\u043d"\ + "\u043e\u043a\u0442"\ + "\u043d\u043e\u044f"\ + "\u0434\u0435\u043a"\ + ""] + ::msgcat::mcset ru MONTHS_FULL [list \ + "\u042f\u043d\u0432\u0430\u0440\u044c"\ + "\u0424\u0435\u0432\u0440\u0430\u043b\u044c"\ + "\u041c\u0430\u0440\u0442"\ + "\u0410\u043f\u0440\u0435\u043b\u044c"\ + "\u041c\u0430\u0439"\ + "\u0418\u044e\u043d\u044c"\ + "\u0418\u044e\u043b\u044c"\ + "\u0410\u0432\u0433\u0443\u0441\u0442"\ + "\u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c"\ + "\u041e\u043a\u0442\u044f\u0431\u0440\u044c"\ + "\u041d\u043e\u044f\u0431\u0440\u044c"\ + "\u0414\u0435\u043a\u0430\u0431\u0440\u044c"\ + ""] + ::msgcat::mcset ru BCE "\u0434\u043e \u043d.\u044d." + ::msgcat::mcset ru CE "\u043d.\u044d." + ::msgcat::mcset ru DATE_FORMAT "%d.%m.%Y" + ::msgcat::mcset ru TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset ru DATE_TIME_FORMAT "%d.%m.%Y %k:%M:%S %z" +} diff --git a/library/msgs/ru_UA.msg b/library/msgs/ru_UA.msg new file mode 100755 index 0000000..6e1f8a8 --- /dev/null +++ b/library/msgs/ru_UA.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ru_UA DATE_FORMAT "%d.%m.%Y" + ::msgcat::mcset ru_UA TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset ru_UA DATE_TIME_FORMAT "%d.%m.%Y %k:%M:%S %z" +} diff --git a/library/msgs/sh.msg b/library/msgs/sh.msg new file mode 100755 index 0000000..6ee0fc7 --- /dev/null +++ b/library/msgs/sh.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset sh DAYS_OF_WEEK_ABBREV [list \ + "Ned"\ + "Pon"\ + "Uto"\ + "Sre"\ + "\u010cet"\ + "Pet"\ + "Sub"] + ::msgcat::mcset sh DAYS_OF_WEEK_FULL [list \ + "Nedelja"\ + "Ponedeljak"\ + "Utorak"\ + "Sreda"\ + "\u010cetvrtak"\ + "Petak"\ + "Subota"] + ::msgcat::mcset sh MONTHS_ABBREV [list \ + "Jan"\ + "Feb"\ + "Mar"\ + "Apr"\ + "Maj"\ + "Jun"\ + "Jul"\ + "Avg"\ + "Sep"\ + "Okt"\ + "Nov"\ + "Dec"\ + ""] + ::msgcat::mcset sh MONTHS_FULL [list \ + "Januar"\ + "Februar"\ + "Mart"\ + "April"\ + "Maj"\ + "Juni"\ + "Juli"\ + "Avgust"\ + "Septembar"\ + "Oktobar"\ + "Novembar"\ + "Decembar"\ + ""] + ::msgcat::mcset sh BCE "p. n. e." + ::msgcat::mcset sh CE "n. e." + ::msgcat::mcset sh DATE_FORMAT "%d.%m.%Y." + ::msgcat::mcset sh TIME_FORMAT "%k.%M.%S" + ::msgcat::mcset sh DATE_TIME_FORMAT "%d.%m.%Y. %k.%M.%S %z" +} diff --git a/library/msgs/sk.msg b/library/msgs/sk.msg new file mode 100755 index 0000000..9b2f0aa --- /dev/null +++ b/library/msgs/sk.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset sk DAYS_OF_WEEK_ABBREV [list \ + "Ne"\ + "Po"\ + "Ut"\ + "St"\ + "\u0160t"\ + "Pa"\ + "So"] + ::msgcat::mcset sk DAYS_OF_WEEK_FULL [list \ + "Nede\u013ee"\ + "Pondelok"\ + "Utorok"\ + "Streda"\ + "\u0160tvrtok"\ + "Piatok"\ + "Sobota"] + ::msgcat::mcset sk MONTHS_ABBREV [list \ + "jan"\ + "feb"\ + "mar"\ + "apr"\ + "m\u00e1j"\ + "j\u00fan"\ + "j\u00fal"\ + "aug"\ + "sep"\ + "okt"\ + "nov"\ + "dec"\ + ""] + ::msgcat::mcset sk MONTHS_FULL [list \ + "janu\u00e1r"\ + "febru\u00e1r"\ + "marec"\ + "apr\u00edl"\ + "m\u00e1j"\ + "j\u00fan"\ + "j\u00fal"\ + "august"\ + "september"\ + "okt\u00f3ber"\ + "november"\ + "december"\ + ""] + ::msgcat::mcset sk BCE "pred n.l." + ::msgcat::mcset sk CE "n.l." + ::msgcat::mcset sk DATE_FORMAT "%e.%m.%Y" + ::msgcat::mcset sk TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset sk DATE_TIME_FORMAT "%e.%m.%Y %k:%M:%S %z" +} diff --git a/library/msgs/sl.msg b/library/msgs/sl.msg new file mode 100755 index 0000000..42bc509 --- /dev/null +++ b/library/msgs/sl.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset sl DAYS_OF_WEEK_ABBREV [list \ + "Ned"\ + "Pon"\ + "Tor"\ + "Sre"\ + "\u010cet"\ + "Pet"\ + "Sob"] + ::msgcat::mcset sl DAYS_OF_WEEK_FULL [list \ + "Nedelja"\ + "Ponedeljek"\ + "Torek"\ + "Sreda"\ + "\u010cetrtek"\ + "Petek"\ + "Sobota"] + ::msgcat::mcset sl MONTHS_ABBREV [list \ + "jan"\ + "feb"\ + "mar"\ + "apr"\ + "maj"\ + "jun"\ + "jul"\ + "avg"\ + "sep"\ + "okt"\ + "nov"\ + "dec"\ + ""] + ::msgcat::mcset sl MONTHS_FULL [list \ + "januar"\ + "februar"\ + "marec"\ + "april"\ + "maj"\ + "junij"\ + "julij"\ + "avgust"\ + "september"\ + "oktober"\ + "november"\ + "december"\ + ""] + ::msgcat::mcset sl BCE "pr.n.\u0161." + ::msgcat::mcset sl CE "po Kr." + ::msgcat::mcset sl DATE_FORMAT "%Y.%m.%e" + ::msgcat::mcset sl TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset sl DATE_TIME_FORMAT "%Y.%m.%e %k:%M:%S %z" +} diff --git a/library/msgs/sq.msg b/library/msgs/sq.msg new file mode 100755 index 0000000..8fb1fce --- /dev/null +++ b/library/msgs/sq.msg @@ -0,0 +1,54 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset sq DAYS_OF_WEEK_ABBREV [list \ + "Die"\ + "H\u00ebn"\ + "Mar"\ + "M\u00ebr"\ + "Enj"\ + "Pre"\ + "Sht"] + ::msgcat::mcset sq DAYS_OF_WEEK_FULL [list \ + "e diel"\ + "e h\u00ebn\u00eb"\ + "e mart\u00eb"\ + "e m\u00ebrkur\u00eb"\ + "e enjte"\ + "e premte"\ + "e shtun\u00eb"] + ::msgcat::mcset sq MONTHS_ABBREV [list \ + "Jan"\ + "Shk"\ + "Mar"\ + "Pri"\ + "Maj"\ + "Qer"\ + "Kor"\ + "Gsh"\ + "Sht"\ + "Tet"\ + "N\u00ebn"\ + "Dhj"\ + ""] + ::msgcat::mcset sq MONTHS_FULL [list \ + "janar"\ + "shkurt"\ + "mars"\ + "prill"\ + "maj"\ + "qershor"\ + "korrik"\ + "gusht"\ + "shtator"\ + "tetor"\ + "n\u00ebntor"\ + "dhjetor"\ + ""] + ::msgcat::mcset sq BCE "p.e.r." + ::msgcat::mcset sq CE "n.e.r." + ::msgcat::mcset sq AM "PD" + ::msgcat::mcset sq PM "MD" + ::msgcat::mcset sq DATE_FORMAT "%Y-%m-%d" + ::msgcat::mcset sq TIME_FORMAT_12 "%l:%M:%S.%P" + ::msgcat::mcset sq DATE_TIME_FORMAT "%Y-%m-%d %l:%M:%S.%P %z" +} diff --git a/library/msgs/sr.msg b/library/msgs/sr.msg new file mode 100755 index 0000000..7576668 --- /dev/null +++ b/library/msgs/sr.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset sr DAYS_OF_WEEK_ABBREV [list \ + "\u041d\u0435\u0434"\ + "\u041f\u043e\u043d"\ + "\u0423\u0442\u043e"\ + "\u0421\u0440\u0435"\ + "\u0427\u0435\u0442"\ + "\u041f\u0435\u0442"\ + "\u0421\u0443\u0431"] + ::msgcat::mcset sr DAYS_OF_WEEK_FULL [list \ + "\u041d\u0435\u0434\u0435\u0459\u0430"\ + "\u041f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a"\ + "\u0423\u0442\u043e\u0440\u0430\u043a"\ + "\u0421\u0440\u0435\u0434\u0430"\ + "\u0427\u0435\u0442\u0432\u0440\u0442\u0430\u043a"\ + "\u041f\u0435\u0442\u0430\u043a"\ + "\u0421\u0443\u0431\u043e\u0442\u0430"] + ::msgcat::mcset sr MONTHS_ABBREV [list \ + "\u0408\u0430\u043d"\ + "\u0424\u0435\u0431"\ + "\u041c\u0430\u0440"\ + "\u0410\u043f\u0440"\ + "\u041c\u0430\u0458"\ + "\u0408\u0443\u043d"\ + "\u0408\u0443\u043b"\ + "\u0410\u0432\u0433"\ + "\u0421\u0435\u043f"\ + "\u041e\u043a\u0442"\ + "\u041d\u043e\u0432"\ + "\u0414\u0435\u0446"\ + ""] + ::msgcat::mcset sr MONTHS_FULL [list \ + "\u0408\u0430\u043d\u0443\u0430\u0440"\ + "\u0424\u0435\u0431\u0440\u0443\u0430\u0440"\ + "\u041c\u0430\u0440\u0442"\ + "\u0410\u043f\u0440\u0438\u043b"\ + "\u041c\u0430\u0458"\ + "\u0408\u0443\u043d\u0438"\ + "\u0408\u0443\u043b\u0438"\ + "\u0410\u0432\u0433\u0443\u0441\u0442"\ + "\u0421\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440"\ + "\u041e\u043a\u0442\u043e\u0431\u0430\u0440"\ + "\u041d\u043e\u0432\u0435\u043c\u0431\u0430\u0440"\ + "\u0414\u0435\u0446\u0435\u043c\u0431\u0430\u0440"\ + ""] + ::msgcat::mcset sr BCE "\u043f. \u043d. \u0435." + ::msgcat::mcset sr CE "\u043d. \u0435" + ::msgcat::mcset sr DATE_FORMAT "%Y.%m.%e" + ::msgcat::mcset sr TIME_FORMAT "%k.%M.%S" + ::msgcat::mcset sr DATE_TIME_FORMAT "%Y.%m.%e %k.%M.%S %z" +} diff --git a/library/msgs/sv.msg b/library/msgs/sv.msg new file mode 100755 index 0000000..f7a67c6 --- /dev/null +++ b/library/msgs/sv.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset sv DAYS_OF_WEEK_ABBREV [list \ + "s\u00f6"\ + "m\u00e5"\ + "ti"\ + "on"\ + "to"\ + "fr"\ + "l\u00f6"] + ::msgcat::mcset sv DAYS_OF_WEEK_FULL [list \ + "s\u00f6ndag"\ + "m\u00e5ndag"\ + "tisdag"\ + "onsdag"\ + "torsdag"\ + "fredag"\ + "l\u00f6rdag"] + ::msgcat::mcset sv MONTHS_ABBREV [list \ + "jan"\ + "feb"\ + "mar"\ + "apr"\ + "maj"\ + "jun"\ + "jul"\ + "aug"\ + "sep"\ + "okt"\ + "nov"\ + "dec"\ + ""] + ::msgcat::mcset sv MONTHS_FULL [list \ + "januari"\ + "februari"\ + "mars"\ + "april"\ + "maj"\ + "juni"\ + "juli"\ + "augusti"\ + "september"\ + "oktober"\ + "november"\ + "december"\ + ""] + ::msgcat::mcset sv BCE "f.Kr." + ::msgcat::mcset sv CE "e.Kr." + ::msgcat::mcset sv DATE_FORMAT "%Y-%m-%d" + ::msgcat::mcset sv TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset sv DATE_TIME_FORMAT "%Y-%m-%d %H:%M:%S %z" +} diff --git a/library/msgs/sw.msg b/library/msgs/sw.msg new file mode 100755 index 0000000..b888b43 --- /dev/null +++ b/library/msgs/sw.msg @@ -0,0 +1,49 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset sw DAYS_OF_WEEK_ABBREV [list \ + "Jpi"\ + "Jtt"\ + "Jnn"\ + "Jtn"\ + "Alh"\ + "Iju"\ + "Jmo"] + ::msgcat::mcset sw DAYS_OF_WEEK_FULL [list \ + "Jumapili"\ + "Jumatatu"\ + "Jumanne"\ + "Jumatano"\ + "Alhamisi"\ + "Ijumaa"\ + "Jumamosi"] + ::msgcat::mcset sw MONTHS_ABBREV [list \ + "Jan"\ + "Feb"\ + "Mar"\ + "Apr"\ + "Mei"\ + "Jun"\ + "Jul"\ + "Ago"\ + "Sep"\ + "Okt"\ + "Nov"\ + "Des"\ + ""] + ::msgcat::mcset sw MONTHS_FULL [list \ + "Januari"\ + "Februari"\ + "Machi"\ + "Aprili"\ + "Mei"\ + "Juni"\ + "Julai"\ + "Agosti"\ + "Septemba"\ + "Oktoba"\ + "Novemba"\ + "Desemba"\ + ""] + ::msgcat::mcset sw BCE "KK" + ::msgcat::mcset sw CE "BK" +} diff --git a/library/msgs/ta.msg b/library/msgs/ta.msg new file mode 100755 index 0000000..4abb90c --- /dev/null +++ b/library/msgs/ta.msg @@ -0,0 +1,39 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ta DAYS_OF_WEEK_FULL [list \ + "\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1"\ + "\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd"\ + "\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd"\ + "\u0baa\u0bc1\u0ba4\u0ba9\u0bcd"\ + "\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd"\ + "\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf"\ + "\u0b9a\u0ba9\u0bbf"] + ::msgcat::mcset ta MONTHS_ABBREV [list \ + "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf"\ + "\u0baa\u0bc6\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf"\ + "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd"\ + "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd"\ + "\u0bae\u0bc7"\ + "\u0b9c\u0bc2\u0ba9\u0bcd"\ + "\u0b9c\u0bc2\u0bb2\u0bc8"\ + "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd"\ + "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd"\ + "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd"\ + "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd"\ + "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcdr"] + ::msgcat::mcset ta MONTHS_FULL [list \ + "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf"\ + "\u0baa\u0bc6\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf"\ + "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd"\ + "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd"\ + "\u0bae\u0bc7"\ + "\u0b9c\u0bc2\u0ba9\u0bcd"\ + "\u0b9c\u0bc2\u0bb2\u0bc8"\ + "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd"\ + "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd"\ + "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd"\ + "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd"\ + "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcdr"] + ::msgcat::mcset ta AM "\u0b95\u0bbf\u0bae\u0bc1" + ::msgcat::mcset ta PM "\u0b95\u0bbf\u0baa\u0bbf" +} diff --git a/library/msgs/ta_IN.msg b/library/msgs/ta_IN.msg new file mode 100755 index 0000000..24590ac --- /dev/null +++ b/library/msgs/ta_IN.msg @@ -0,0 +1,6 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset ta_IN DATE_FORMAT "%d %M %Y" + ::msgcat::mcset ta_IN TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset ta_IN DATE_TIME_FORMAT "%d %M %Y %I:%M:%S %P %z" +} diff --git a/library/msgs/te.msg b/library/msgs/te.msg new file mode 100755 index 0000000..6111473 --- /dev/null +++ b/library/msgs/te.msg @@ -0,0 +1,47 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset te DAYS_OF_WEEK_ABBREV [list \ + "\u0c06\u0c26\u0c3f"\ + "\u0c38\u0c4b\u0c2e"\ + "\u0c2e\u0c02\u0c17\u0c33"\ + "\u0c2c\u0c41\u0c27"\ + "\u0c17\u0c41\u0c30\u0c41"\ + "\u0c36\u0c41\u0c15\u0c4d\u0c30"\ + "\u0c36\u0c28\u0c3f"] + ::msgcat::mcset te DAYS_OF_WEEK_FULL [list \ + "\u0c06\u0c26\u0c3f\u0c35\u0c3e\u0c30\u0c02"\ + "\u0c38\u0c4b\u0c2e\u0c35\u0c3e\u0c30\u0c02"\ + "\u0c2e\u0c02\u0c17\u0c33\u0c35\u0c3e\u0c30\u0c02"\ + "\u0c2c\u0c41\u0c27\u0c35\u0c3e\u0c30\u0c02"\ + "\u0c17\u0c41\u0c30\u0c41\u0c35\u0c3e\u0c30\u0c02"\ + "\u0c36\u0c41\u0c15\u0c4d\u0c30\u0c35\u0c3e\u0c30\u0c02"\ + "\u0c36\u0c28\u0c3f\u0c35\u0c3e\u0c30\u0c02"] + ::msgcat::mcset te MONTHS_ABBREV [list \ + "\u0c1c\u0c28\u0c35\u0c30\u0c3f"\ + "\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f"\ + "\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f"\ + "\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d"\ + "\u0c2e\u0c47"\ + "\u0c1c\u0c42\u0c28\u0c4d"\ + "\u0c1c\u0c42\u0c32\u0c48"\ + "\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41"\ + "\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d"\ + "\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d"\ + "\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d"\ + "\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d"\ + ""] + ::msgcat::mcset te MONTHS_FULL [list \ + "\u0c1c\u0c28\u0c35\u0c30\u0c3f"\ + "\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f"\ + "\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f"\ + "\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d"\ + "\u0c2e\u0c47"\ + "\u0c1c\u0c42\u0c28\u0c4d"\ + "\u0c1c\u0c42\u0c32\u0c48"\ + "\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41"\ + "\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d"\ + "\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d"\ + "\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d"\ + "\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d"\ + ""] +} diff --git a/library/msgs/te_IN.msg b/library/msgs/te_IN.msg new file mode 100755 index 0000000..61638b5 --- /dev/null +++ b/library/msgs/te_IN.msg @@ -0,0 +1,8 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset te_IN AM "\u0c2a\u0c42\u0c30\u0c4d\u0c35\u0c3e\u0c39\u0c4d\u0c28" + ::msgcat::mcset te_IN PM "\u0c05\u0c2a\u0c30\u0c3e\u0c39\u0c4d\u0c28" + ::msgcat::mcset te_IN DATE_FORMAT "%d/%m/%Y" + ::msgcat::mcset te_IN TIME_FORMAT_12 "%I:%M:%S %P" + ::msgcat::mcset te_IN DATE_TIME_FORMAT "%d/%m/%Y %I:%M:%S %P %z" +} diff --git a/library/msgs/th.msg b/library/msgs/th.msg new file mode 100755 index 0000000..7486c35 --- /dev/null +++ b/library/msgs/th.msg @@ -0,0 +1,54 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset th DAYS_OF_WEEK_ABBREV [list \ + "\u0e2d\u0e32."\ + "\u0e08."\ + "\u0e2d."\ + "\u0e1e."\ + "\u0e1e\u0e24."\ + "\u0e28."\ + "\u0e2a."] + ::msgcat::mcset th DAYS_OF_WEEK_FULL [list \ + "\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c"\ + "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c"\ + "\u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23"\ + "\u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18"\ + "\u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35"\ + "\u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c"\ + "\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c"] + ::msgcat::mcset th MONTHS_ABBREV [list \ + "\u0e21.\u0e04."\ + "\u0e01.\u0e1e."\ + "\u0e21\u0e35.\u0e04."\ + "\u0e40\u0e21.\u0e22."\ + "\u0e1e.\u0e04."\ + "\u0e21\u0e34.\u0e22."\ + "\u0e01.\u0e04."\ + "\u0e2a.\u0e04."\ + "\u0e01.\u0e22."\ + "\u0e15.\u0e04."\ + "\u0e1e.\u0e22."\ + "\u0e18.\u0e04."\ + ""] + ::msgcat::mcset th MONTHS_FULL [list \ + "\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21"\ + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"\ + "\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21"\ + "\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19"\ + "\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21"\ + "\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19"\ + "\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21"\ + "\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21"\ + "\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19"\ + "\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21"\ + "\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19"\ + "\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21"\ + ""] + ::msgcat::mcset th BCE "\u0e25\u0e17\u0e35\u0e48" + ::msgcat::mcset th CE "\u0e04.\u0e28." + ::msgcat::mcset th AM "\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07" + ::msgcat::mcset th PM "\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07" + ::msgcat::mcset th DATE_FORMAT "%e/%m/%Y" + ::msgcat::mcset th TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset th DATE_TIME_FORMAT "%e/%m/%Y %k:%M:%S %z" +} diff --git a/library/msgs/tr.msg b/library/msgs/tr.msg new file mode 100755 index 0000000..7b2ecf9 --- /dev/null +++ b/library/msgs/tr.msg @@ -0,0 +1,50 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset tr DAYS_OF_WEEK_ABBREV [list \ + "Paz"\ + "Pzt"\ + "Sal"\ + "\u00c7ar"\ + "Per"\ + "Cum"\ + "Cmt"] + ::msgcat::mcset tr DAYS_OF_WEEK_FULL [list \ + "Pazar"\ + "Pazartesi"\ + "Sal\u0131"\ + "\u00c7ar\u015famba"\ + "Per\u015fembe"\ + "Cuma"\ + "Cumartesi"] + ::msgcat::mcset tr MONTHS_ABBREV [list \ + "Oca"\ + "\u015eub"\ + "Mar"\ + "Nis"\ + "May"\ + "Haz"\ + "Tem"\ + "A\u011fu"\ + "Eyl"\ + "Eki"\ + "Kas"\ + "Ara"\ + ""] + ::msgcat::mcset tr MONTHS_FULL [list \ + "Ocak"\ + "\u015eubat"\ + "Mart"\ + "Nisan"\ + "May\u0131s"\ + "Haziran"\ + "Temmuz"\ + "A\u011fustos"\ + "Eyl\u00fcl"\ + "Ekim"\ + "Kas\u0131m"\ + "Aral\u0131k"\ + ""] + ::msgcat::mcset tr DATE_FORMAT "%d.%m.%Y" + ::msgcat::mcset tr TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset tr DATE_TIME_FORMAT "%d.%m.%Y %H:%M:%S %z" +} diff --git a/library/msgs/uk.msg b/library/msgs/uk.msg new file mode 100755 index 0000000..3e24f86 --- /dev/null +++ b/library/msgs/uk.msg @@ -0,0 +1,52 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset uk DAYS_OF_WEEK_ABBREV [list \ + "\u043d\u0434"\ + "\u043f\u043d"\ + "\u0432\u0442"\ + "\u0441\u0440"\ + "\u0447\u0442"\ + "\u043f\u0442"\ + "\u0441\u0431"] + ::msgcat::mcset uk DAYS_OF_WEEK_FULL [list \ + "\u043d\u0435\u0434\u0456\u043b\u044f"\ + "\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a"\ + "\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a"\ + "\u0441\u0435\u0440\u0435\u0434\u0430"\ + "\u0447\u0435\u0442\u0432\u0435\u0440"\ + "\u043f'\u044f\u0442\u043d\u0438\u0446\u044f"\ + "\u0441\u0443\u0431\u043e\u0442\u0430"] + ::msgcat::mcset uk MONTHS_ABBREV [list \ + "\u0441\u0456\u0447"\ + "\u043b\u044e\u0442"\ + "\u0431\u0435\u0440"\ + "\u043a\u0432\u0456\u0442"\ + "\u0442\u0440\u0430\u0432"\ + "\u0447\u0435\u0440\u0432"\ + "\u043b\u0438\u043f"\ + "\u0441\u0435\u0440\u043f"\ + "\u0432\u0435\u0440"\ + "\u0436\u043e\u0432\u0442"\ + "\u043b\u0438\u0441\u0442"\ + "\u0433\u0440\u0443\u0434"\ + ""] + ::msgcat::mcset uk MONTHS_FULL [list \ + "\u0441\u0456\u0447\u043d\u044f"\ + "\u043b\u044e\u0442\u043e\u0433\u043e"\ + "\u0431\u0435\u0440\u0435\u0436\u043d\u044f"\ + "\u043a\u0432\u0456\u0442\u043d\u044f"\ + "\u0442\u0440\u0430\u0432\u043d\u044f"\ + "\u0447\u0435\u0440\u0432\u043d\u044f"\ + "\u043b\u0438\u043f\u043d\u044f"\ + "\u0441\u0435\u0440\u043f\u043d\u044f"\ + "\u0432\u0435\u0440\u0435\u0441\u043d\u044f"\ + "\u0436\u043e\u0432\u0442\u043d\u044f"\ + "\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434\u0430"\ + "\u0433\u0440\u0443\u0434\u043d\u044f"\ + ""] + ::msgcat::mcset uk BCE "\u0434\u043e \u043d.\u0435." + ::msgcat::mcset uk CE "\u043f\u0456\u0441\u043b\u044f \u043d.\u0435." + ::msgcat::mcset uk DATE_FORMAT "%e/%m/%Y" + ::msgcat::mcset uk TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset uk DATE_TIME_FORMAT "%e/%m/%Y %k:%M:%S %z" +} diff --git a/library/msgs/vi.msg b/library/msgs/vi.msg new file mode 100755 index 0000000..c98b2a6 --- /dev/null +++ b/library/msgs/vi.msg @@ -0,0 +1,50 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset vi DAYS_OF_WEEK_ABBREV [list \ + "Th 2"\ + "Th 3"\ + "Th 4"\ + "Th 5"\ + "Th 6"\ + "Th 7"\ + "CN"] + ::msgcat::mcset vi DAYS_OF_WEEK_FULL [list \ + "Th\u01b0\u0301 hai"\ + "Th\u01b0\u0301 ba"\ + "Th\u01b0\u0301 t\u01b0"\ + "Th\u01b0\u0301 n\u0103m"\ + "Th\u01b0\u0301 s\u00e1u"\ + "Th\u01b0\u0301 ba\u0309y"\ + "Chu\u0309 nh\u00e2\u0323t"] + ::msgcat::mcset vi MONTHS_ABBREV [list \ + "Thg 1"\ + "Thg 2"\ + "Thg 3"\ + "Thg 4"\ + "Thg 5"\ + "Thg 6"\ + "Thg 7"\ + "Thg 8"\ + "Thg 9"\ + "Thg 10"\ + "Thg 11"\ + "Thg 12"\ + ""] + ::msgcat::mcset vi MONTHS_FULL [list \ + "Th\u00e1ng m\u00f4\u0323t"\ + "Th\u00e1ng hai"\ + "Th\u00e1ng ba"\ + "Th\u00e1ng t\u01b0"\ + "Th\u00e1ng n\u0103m"\ + "Th\u00e1ng s\u00e1u"\ + "Th\u00e1ng ba\u0309y"\ + "Th\u00e1ng t\u00e1m"\ + "Th\u00e1ng ch\u00edn"\ + "Th\u00e1ng m\u01b0\u01a1\u0300i"\ + "Th\u00e1ng m\u01b0\u01a1\u0300i m\u00f4\u0323t"\ + "Th\u00e1ng m\u01b0\u01a1\u0300i hai"\ + ""] + ::msgcat::mcset vi DATE_FORMAT "%d %b %Y" + ::msgcat::mcset vi TIME_FORMAT "%H:%M:%S" + ::msgcat::mcset vi DATE_TIME_FORMAT "%d %b %Y %H:%M:%S %z" +} diff --git a/library/msgs/zh.msg b/library/msgs/zh.msg new file mode 100755 index 0000000..b799a32 --- /dev/null +++ b/library/msgs/zh.msg @@ -0,0 +1,55 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset zh DAYS_OF_WEEK_ABBREV [list \ + "\u661f\u671f\u65e5"\ + "\u661f\u671f\u4e00"\ + "\u661f\u671f\u4e8c"\ + "\u661f\u671f\u4e09"\ + "\u661f\u671f\u56db"\ + "\u661f\u671f\u4e94"\ + "\u661f\u671f\u516d"] + ::msgcat::mcset zh DAYS_OF_WEEK_FULL [list \ + "\u661f\u671f\u65e5"\ + "\u661f\u671f\u4e00"\ + "\u661f\u671f\u4e8c"\ + "\u661f\u671f\u4e09"\ + "\u661f\u671f\u56db"\ + "\u661f\u671f\u4e94"\ + "\u661f\u671f\u516d"] + ::msgcat::mcset zh MONTHS_ABBREV [list \ + "\u4e00\u6708"\ + "\u4e8c\u6708"\ + "\u4e09\u6708"\ + "\u56db\u6708"\ + "\u4e94\u6708"\ + "\u516d\u6708"\ + "\u4e03\u6708"\ + "\u516b\u6708"\ + "\u4e5d\u6708"\ + "\u5341\u6708"\ + "\u5341\u4e00\u6708"\ + "\u5341\u4e8c\u6708"\ + ""] + ::msgcat::mcset zh MONTHS_FULL [list \ + "\u4e00\u6708"\ + "\u4e8c\u6708"\ + "\u4e09\u6708"\ + "\u56db\u6708"\ + "\u4e94\u6708"\ + "\u516d\u6708"\ + "\u4e03\u6708"\ + "\u516b\u6708"\ + "\u4e5d\u6708"\ + "\u5341\u6708"\ + "\u5341\u4e00\u6708"\ + "\u5341\u4e8c\u6708"\ + ""] + ::msgcat::mcset zh BCE "\u516c\u5143\u524d" + ::msgcat::mcset zh CE "\u516c\u5143" + ::msgcat::mcset zh AM "\u4e0a\u5348" + ::msgcat::mcset zh PM "\u4e0b\u5348" + ::msgcat::mcset zh LOCALE_NUMERALS "\u3007 \u4e00 \u4e8c \u4e09 \u56db \u4e94 \u516d \u4e03 \u516b \u4e5d \u5341 \u5341\u4e00 \u5341\u4e8c \u5341\u4e09 \u5341\u56db \u5341\u4e94 \u5341\u516d \u5341\u4e03 \u5341\u516b \u5341\u4e5d \u4e8c\u5341 \u5eff\u4e00 \u5eff\u4e8c \u5eff\u4e09 \u5eff\u56db \u5eff\u4e94 \u5eff\u516d \u5eff\u4e03 \u5eff\u516b \u5eff\u4e5d \u4e09\u5341 \u5345\u4e00 \u5345\u4e8c \u5345\u4e09 \u5345\u56db \u5345\u4e94 \u5345\u516d \u5345\u4e03 \u5345\u516b \u5345\u4e5d \u56db\u5341 \u56db\u5341\u4e00 \u56db\u5341\u4e8c \u56db\u5341\u4e09 \u56db\u5341\u56db \u56db\u5341\u4e94 \u56db\u5341\u516d \u56db\u5341\u4e03 \u56db\u5341\u516b \u56db\u5341\u4e5d \u4e94\u5341 \u4e94\u5341\u4e00 \u4e94\u5341\u4e8c \u4e94\u5341\u4e09 \u4e94\u5341\u56db \u4e94\u5341\u4e94 \u4e94\u5341\u516d \u4e94\u5341\u4e03 \u4e94\u5341\u516b \u4e94\u5341\u4e5d \u516d\u5341 \u516d\u5341\u4e00 \u516d\u5341\u4e8c \u516d\u5341\u4e09 \u516d\u5341\u56db \u516d\u5341\u4e94 \u516d\u5341\u516d \u516d\u5341\u4e03 \u516d\u5341\u516b \u516d\u5341\u4e5d \u4e03\u5341 \u4e03\u5341\u4e00 \u4e03\u5341\u4e8c \u4e03\u5341\u4e09 \u4e03\u5341\u56db \u4e03\u5341\u4e94 \u4e03\u5341\u516d \u4e03\u5341\u4e03 \u4e03\u5341\u516b \u4e03\u5341\u4e5d \u516b\u5341 \u516b\u5341\u4e00 \u516b\u5341\u4e8c \u516b\u5341\u4e09 \u516b\u5341\u56db \u516b\u5341\u4e94 \u516b\u5341\u516d \u516b\u5341\u4e03 \u516b\u5341\u516b \u516b\u5341\u4e5d \u4e5d\u5341 \u4e5d\u5341\u4e00 \u4e5d\u5341\u4e8c \u4e5d\u5341\u4e09 \u4e5d\u5341\u56db \u4e5d\u5341\u4e94 \u4e5d\u5341\u516d \u4e5d\u5341\u4e03 \u4e5d\u5341\u516b \u4e5d\u5341\u4e5d" + ::msgcat::mcset zh LOCALE_DATE_FORMAT "\u516c\u5143%Y\u5e74%B%Od\u65e5" + ::msgcat::mcset zh LOCALE_TIME_FORMAT "%OH\u65f6%OM\u5206%OS\u79d2" + ::msgcat::mcset zh LOCALE_DATE_TIME_FORMAT "%A %Y\u5e74%B%Od\u65e5%OH\u65f6%OM\u5206%OS\u79d2 %z" +} diff --git a/library/msgs/zh_CN.msg b/library/msgs/zh_CN.msg new file mode 100755 index 0000000..d62ce77 --- /dev/null +++ b/library/msgs/zh_CN.msg @@ -0,0 +1,7 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset zh_CN DATE_FORMAT "%Y-%m-%e" + ::msgcat::mcset zh_CN TIME_FORMAT "%k:%M:%S" + ::msgcat::mcset zh_CN TIME_FORMAT_12 "%P%I\u65f6%M\u5206%S\u79d2" + ::msgcat::mcset zh_CN DATE_TIME_FORMAT "%Y-%m-%e %k:%M:%S %z" +} diff --git a/library/msgs/zh_HK.msg b/library/msgs/zh_HK.msg new file mode 100755 index 0000000..badb1dd --- /dev/null +++ b/library/msgs/zh_HK.msg @@ -0,0 +1,28 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset zh_HK DAYS_OF_WEEK_ABBREV [list \ + "\u65e5"\ + "\u4e00"\ + "\u4e8c"\ + "\u4e09"\ + "\u56db"\ + "\u4e94"\ + "\u516d"] + ::msgcat::mcset zh_HK MONTHS_ABBREV [list \ + "1\u6708"\ + "2\u6708"\ + "3\u6708"\ + "4\u6708"\ + "5\u6708"\ + "6\u6708"\ + "7\u6708"\ + "8\u6708"\ + "9\u6708"\ + "10\u6708"\ + "11\u6708"\ + "12\u6708"\ + ""] + ::msgcat::mcset zh_HK DATE_FORMAT "%Y\u5e74%m\u6708%e\u65e5" + ::msgcat::mcset zh_HK TIME_FORMAT_12 "%P%I:%M:%S" + ::msgcat::mcset zh_HK DATE_TIME_FORMAT "%Y\u5e74%m\u6708%e\u65e5 %P%I:%M:%S %z" +} diff --git a/library/msgs/zh_SG.msg b/library/msgs/zh_SG.msg new file mode 100755 index 0000000..a2f3e39 --- /dev/null +++ b/library/msgs/zh_SG.msg @@ -0,0 +1,8 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset zh_SG AM "\u4e0a\u5348" + ::msgcat::mcset zh_SG PM "\u4e2d\u5348" + ::msgcat::mcset zh_SG DATE_FORMAT "%d %B %Y" + ::msgcat::mcset zh_SG TIME_FORMAT_12 "%P %I:%M:%S" + ::msgcat::mcset zh_SG DATE_TIME_FORMAT "%d %B %Y %P %I:%M:%S %z" +} diff --git a/library/msgs/zh_TW.msg b/library/msgs/zh_TW.msg new file mode 100755 index 0000000..e0796b1 --- /dev/null +++ b/library/msgs/zh_TW.msg @@ -0,0 +1,8 @@ +# created by tools/loadICU.tcl -- do not edit +namespace eval ::tcl::clock { + ::msgcat::mcset zh_TW BCE "\u6c11\u570b\u524d" + ::msgcat::mcset zh_TW CE "\u6c11\u570b" + ::msgcat::mcset zh_TW DATE_FORMAT "%Y/%m/%e" + ::msgcat::mcset zh_TW TIME_FORMAT_12 "%P %I:%M:%S" + ::msgcat::mcset zh_TW DATE_TIME_FORMAT "%Y/%m/%e %P %I:%M:%S %z" +} diff --git a/library/tzdata/Africa/Abidjan b/library/tzdata/Africa/Abidjan new file mode 100644 index 0000000..ebe617d --- /dev/null +++ b/library/tzdata/Africa/Abidjan @@ -0,0 +1,6 @@ +# created by ../tools/tclZIC.tcl - do not edit + +set TZData(:Africa/Abidjan) { + {-9223372036854775808 -968 0 LMT} + {-1830383032 0 0 GMT} +} diff --git a/library/tzdata/Africa/Accra b/library/tzdata/Africa/Accra new file mode 100644 index 0000000..7e323e5 --- /dev/null +++ b/library/tzdata/Africa/Accra @@ -0,0 +1,20 @@ +# created by ../tools/tclZIC.tcl - do not edit + +set TZData(:Africa/Accra) { + {-9223372036854775808 -52 0 LMT} + {-1640995148 0 0 GMT} + {-1051920000 1200 1 GHST} + {-1041466800 0 0 GMT} + {-1020384000 1200 1 GHST} + {-1009930800 0 0 GMT} + {-988848000 1200 1 GHST} + {-978394800 0 0 GMT} + {-957312000 1200 1 GHST} + {-946858800 0 0 GMT} + {-925689600 1200 1 GHST} + {-915236400 0 0 GMT} + {-894153600 1200 1 GHST} + {-883700400 0 0 GMT} + {-862617600 1200 1 GHST} + {-852164400 0 0 GMT} +} diff --git a/library/tzdata/Africa/Addis_Ababa b/library/tzdata/Africa/Addis_Ababa new file mode 100644 index 0000000..fc45012 --- /dev/null +++ b/library/tzdata/Africa/Addis_Ababa @@ -0,0 +1,7 @@ +# created by ../tools/tclZIC.tcl - do not edit + +set TZData(:Africa/Addis_Ababa) { + {-9223372036854775808 9288 0 LMT} + {-3155682888 9320 0 ADMT} + {-1062210920 10800 0 EAT} +} diff --git a/library/tzdata/Africa/Algiers b/library/tzdata/Africa/Algiers new file mode 100644 index 0000000..730eb02 --- /dev/null +++ b/library/tzdata/Africa/Algiers @@ -0,0 +1,39 @@ +# created by ../tools/tclZIC.tcl - do not edit + +set TZData(:Africa/Algiers) { + {-9223372036854775808 732 0 LMT} + {-2486679072 561 0 PMT} + {-1855958961 0 0 WET} + {-1689814800 3600 1 WEST} + {-1680397200 0 0 WET} + {-1665363600 3600 1 WEST} + {-1648342800 0 0 WET} + {-1635123600 3600 1 WEST} + {-1616893200 0 0 WET} + {-1604278800 3600 1 WEST} + {-1585443600 0 0 WET} + {-1574038800 3600 1 WEST} + {-1552266000 0 0 WET} + {-1539997200 3600 1 WEST} + {-1531443600 0 0 WET} + {-956365200 3600 1 WEST} + {-950486400 0 0 WET} + {-942012000 3600 0 CET} + {-812502000 7200 1 CEST} + {-796262400 3600 0 CET} + {-781052400 7200 1 CEST} + {-766630800 3600 0 CET} + {-733280400 0 0 WET} + {-439430400 3600 0 CET} + {-212