changelog shortlog tags branches changeset file revisions annotate raw help

Mercurial > hg > werc / bin/werclib.rc

revision 662: bd76af29cfa7
parent 657: fb460a671d19
     1.1--- a/bin/werclib.rc	Wed Feb 10 20:20:31 2016 -0500
     1.2+++ b/bin/werclib.rc	Wed Feb 10 20:29:27 2016 -0500
     1.3@@ -120,6 +120,240 @@
     1.4     }
     1.5 }
     1.6 
     1.7+fn datei { datet | sed 's/T.*$//' }
     1.8+
     1.9+fn datet {
    1.10+	date=`{read}
    1.11+	switch($date(2)){
    1.12+	case Jan;	mo=01
    1.13+	case Feb;	mo=02
    1.14+	case Mar;	mo=03
    1.15+	case Apr;	mo=04
    1.16+	case May;	mo=05
    1.17+	case Jun;	mo=06
    1.18+	case Jul;	mo=07
    1.19+	case Aug;	mo=08
    1.20+	case Sep;	mo=09
    1.21+	case Oct;	mo=10
    1.22+	case Nov;	mo=11
    1.23+	case Dec;	mo=12
    1.24+	}
    1.25+	switch($date(3)){
    1.26+	case [0-9]
    1.27+		da=0^$date(3)
    1.28+	case *
    1.29+		da=$date(3)
    1.30+	}
    1.31+	switch($date(5)){
    1.32+	case A;	tz=+0100
    1.33+	case ADT;	tz=-0300
    1.34+	case AFT;	tz=+430
    1.35+	case AKDT;	tz=-0800
    1.36+	case AKST;	tz=-0900
    1.37+	case ALMT;	tz=+0600
    1.38+	case AMST;	tz=-0300
    1.39+	case AMT;	tz=-0400
    1.40+	case ANAST;	tz=+1200
    1.41+	case ANAT;	tz=+1200
    1.42+	case AQTT;	tz=+0500
    1.43+	case ART;	tz=-0300
    1.44+	case AST;	tz=-0400
    1.45+	case AZOST;	tz=+0000
    1.46+	case AZOT;	tz=-0100
    1.47+	case AZST;	tz=+0500
    1.48+	case AZT;	tz=+0400
    1.49+	case B;	tz=+0200
    1.50+	case BNT;	tz=+0800
    1.51+	case BOT;	tz=-0400
    1.52+	case BRST;	tz=-0200
    1.53+	case BRT;	tz=-0300
    1.54+	case BST;	tz=+0100
    1.55+	case BTT;	tz=+0600
    1.56+	case C;	tz=+0300
    1.57+	case CAST;	tz=+0800
    1.58+	case CAT;	tz=+0200
    1.59+	case CCT;	tz=+0630
    1.60+	case CDT;	tz=-0500
    1.61+	case CEST;	tz=+0200
    1.62+	case CET;	tz=+0100
    1.63+	case CHADT;	tz=+1345
    1.64+	case CHAST;	tz=+1245
    1.65+	case CKT;	tz=-1000
    1.66+	case CLST;	tz=-0300
    1.67+	case CLT;	tz=-0400
    1.68+	case COT;	tz=-0500
    1.69+	case CST;	tz=-0600
    1.70+	case CVT;	tz=-0100
    1.71+	case CXT;	tz=+0700
    1.72+	case ChST;	tz=+1000
    1.73+	case D;	tz=+0400
    1.74+	case DAVT;	tz=+0700
    1.75+	case E;	tz=+0500
    1.76+	case EASST;	tz=-0500
    1.77+	case EAST;	tz=-0600
    1.78+	case EAT;	tz=+0300
    1.79+	case ECT;	tz=-0500
    1.80+	case EDT;	tz=-0400
    1.81+	case EEST;	tz=+0300
    1.82+	case EET;	tz=+0200
    1.83+	case EGST;	tz=+0000
    1.84+	case EGT;	tz=-0100
    1.85+	case EST;	tz=-0500
    1.86+	case ET;	tz=-0500
    1.87+	case F;	tz=+0600
    1.88+	case FJST;	tz=+1300
    1.89+	case FJT;	tz=+1200
    1.90+	case FKST;	tz=-0300
    1.91+	case FKT;	tz=-0400
    1.92+	case FNT;	tz=-0200
    1.93+	case G;	tz=+0700
    1.94+	case GALT;	tz=-0600
    1.95+	case GAMT;	tz=-0900
    1.96+	case GET;	tz=+0400
    1.97+	case GFT;	tz=-0300
    1.98+	case GILT;	tz=+1200
    1.99+	case GMT;	tz=+0000
   1.100+	case GST;	tz=+0400
   1.101+	case GYT;	tz=-0400
   1.102+	case H;	tz=+0800
   1.103+	case HAA;	tz=-0300
   1.104+	case HAC;	tz=-0500
   1.105+	case HADT;	tz=-0900
   1.106+	case HAE;	tz=-0400
   1.107+	case HAP;	tz=-0700
   1.108+	case HAR;	tz=-0600
   1.109+	case HAST;	tz=-1000
   1.110+	case HAT;	tz=-0230
   1.111+	case HAY;	tz=-0800
   1.112+	case HKT;	tz=+0800
   1.113+	case HLV;	tz=-0430
   1.114+	case HNA;	tz=-0400
   1.115+	case HNC;	tz=-0600
   1.116+	case HNE;	tz=-0500
   1.117+	case HNP;	tz=-0800
   1.118+	case HNR;	tz=-0700
   1.119+	case HNT;	tz=-0330
   1.120+	case HNY;	tz=-0900
   1.121+	case HOVT;	tz=+0700
   1.122+	case I;	tz=+0900
   1.123+	case ICT;	tz=+0700
   1.124+	case IDT;	tz=+0300
   1.125+	case IOT;	tz=+0600
   1.126+	case IRDT;	tz=+0430
   1.127+	case IRKST;	tz=+0900
   1.128+	case IRKT;	tz=+0800
   1.129+	case IRST;	tz=+0330
   1.130+	case IST;	tz=+0200
   1.131+	case JST;	tz=+0900
   1.132+	case K;	tz=+1000
   1.133+	case KGT;	tz=+0600
   1.134+	case KRAST;	tz=+0800
   1.135+	case KRAT;	tz=+0700
   1.136+	case KST;	tz=+0900
   1.137+	case KUYT;	tz=+0400
   1.138+	case L;	tz=+1100
   1.139+	case LHDT;	tz=+1100
   1.140+	case LHST;	tz=+1030
   1.141+	case LINT;	tz=+1400
   1.142+	case M;	tz=+1200
   1.143+	case MAGST;	tz=+1200
   1.144+	case MAGT;	tz=+1100
   1.145+	case MART;	tz=-0930
   1.146+	case MAWT;	tz=+0500
   1.147+	case MDT;	tz=-0600
   1.148+	case MHT;	tz=+1200
   1.149+	case MMT;	tz=+0630
   1.150+	case MSD;	tz=+0400
   1.151+	case MSK;	tz=+0300
   1.152+	case MST;	tz=-0700
   1.153+	case MUT;	tz=+0400
   1.154+	case MVT;	tz=+0500
   1.155+	case MYT;	tz=+0800
   1.156+	case N;	tz=-0100
   1.157+	case NCT;	tz=+1100
   1.158+	case NDT;	tz=-0230
   1.159+	case NFT;	tz=+1130
   1.160+	case NOVST;	tz=+0700
   1.161+	case NOVT;	tz=+0600
   1.162+	case NPT;	tz=+0545
   1.163+	case NST;	tz=-0330
   1.164+	case NUT;	tz=-1100
   1.165+	case NZDT;	tz=+1300
   1.166+	case NZST;	tz=+1200
   1.167+	case O;	tz=-0200
   1.168+	case OMSST;	tz=+0700
   1.169+	case OMST;	tz=+0600
   1.170+	case P;	tz=-0300
   1.171+	case PDT;	tz=-0700
   1.172+	case PET;	tz=-0500
   1.173+	case PETST;	tz=+1200
   1.174+	case PETT;	tz=+1200
   1.175+	case PGT;	tz=+1000
   1.176+	case PHOT;	tz=+1300
   1.177+	case PHT;	tz=+0800
   1.178+	case PKT;	tz=+0500
   1.179+	case PMDT;	tz=-0200
   1.180+	case PMST;	tz=-0300
   1.181+	case PONT;	tz=+1100
   1.182+	case PST;	tz=-0800
   1.183+	case PT;	tz=-0800
   1.184+	case PWT;	tz=+0900
   1.185+	case PYST;	tz=-0300
   1.186+	case PYT;	tz=-0400
   1.187+	case Q;	tz=-0400
   1.188+	case R;	tz=-0500
   1.189+	case RET;	tz=+0400
   1.190+	case S;	tz=-0600
   1.191+	case SAMT;	tz=+0400
   1.192+	case SAST;	tz=+0200
   1.193+	case SBT;	tz=+1100
   1.194+	case SCT;	tz=+0400
   1.195+	case SGT;	tz=+0800
   1.196+	case SRT;	tz=-0300
   1.197+	case SST;	tz=-1100
   1.198+	case T;	tz=-0700
   1.199+	case TAHT;	tz=-1000
   1.200+	case TFT;	tz=+0500
   1.201+	case TJT;	tz=+0500
   1.202+	case TKT;	tz=-1000
   1.203+	case TLT;	tz=+0900
   1.204+	case TMT;	tz=+0500
   1.205+	case TVT;	tz=+1200
   1.206+	case U;	tz=-0800
   1.207+	case ULAT;	tz=+0800
   1.208+	case UYST;	tz=-0200
   1.209+	case UYT;	tz=-0300
   1.210+	case UZT;	tz=+0500
   1.211+	case V;	tz=-0900
   1.212+	case VET;	tz=-0430
   1.213+	case VLAST;	tz=+1100
   1.214+	case VLAT;	tz=+1000
   1.215+	case VUT;	tz=+1100
   1.216+	case W;	tz=-1000
   1.217+	case WAST;	tz=+0200
   1.218+	case WAT;	tz=+0100
   1.219+	case WDT;	tz=+0900
   1.220+	case WEST;	tz=+0100
   1.221+	case WET;	tz=+0000
   1.222+	case WFT;	tz=+1200
   1.223+	case WGST;	tz=-0200
   1.224+	case WGT;	tz=-0300
   1.225+	case WIB;	tz=+0700
   1.226+	case WIT;	tz=+0900
   1.227+	case WITA;	tz=+0800
   1.228+	case WST;	tz=+0800
   1.229+	case WT;	tz=+0000
   1.230+	case X;	tz=-1100
   1.231+	case Y;	tz=-1200
   1.232+	case YAKST;	tz=+1000
   1.233+	case YAKT;	tz=+0900
   1.234+	case YAPT;	tz=+1000
   1.235+	case YEKST;	tz=+0600
   1.236+	case YEKT;	tz=+0500
   1.237+	case Z;	tz=+0000
   1.238+	}
   1.239+	echo $date(6)^-$mo-$da^T^$date(4)^$tz
   1.240+}
   1.241 
   1.242 ##########################################################################
   1.243 ##########################################################################