2021-08-13 01:33:42 +00:00
|
|
|
//
|
|
|
|
// Copyright 2020 FoxyUtils ehf. All rights reserved.
|
|
|
|
//
|
|
|
|
// This is a commercial product and requires a license to operate.
|
|
|
|
// A trial license can be obtained at https://unidoc.io
|
|
|
|
//
|
|
|
|
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by the UniDoc End User License Agreement
|
|
|
|
// terms that can be accessed at https://unidoc.io/eula/
|
|
|
|
|
2021-10-22 10:53:20 +00:00
|
|
|
package timeutils ;import (_a "errors";_c "fmt";_e "regexp";_f "strconv";_af "time";);var _fg =_e .MustCompile ("\u005c\u0073\u002a\u0044\u005c\u0073\u002a:\u005c\u0073\u002a\u0028\u005c\u0064\u007b\u0034\u007d\u0029\u0028\u005c\u0064\u007b2\u007d)\u0028\u005c\u0064\u007b\u0032\u007d)\u0028\u005c\u0064\u007b\u0032\u007d\u0029(\u005c\u0064\u007b\u0032\u007d\u0029\u0028\u005c\u0064\u007b\u0032\u007d\u0029\u0028\u005b\u002b\u002d\u005a\u005d\u0029\u003f\u0028\u005cd\u007b\u0032\u007d\u0029\u003f\u0027\u003f\u0028\u005c\u0064\u007b\u0032\u007d)\u003f");
|
|
|
|
func ParsePdfTime (pdfTime string )(_af .Time ,error ){_gg :=_fg .FindAllStringSubmatch (pdfTime ,1);if len (_gg )< 1{return _af .Time {},_c .Errorf ("\u0069n\u0076\u0061\u006c\u0069\u0064\u0020\u0064\u0061\u0074\u0065\u0020s\u0074\u0072\u0069\u006e\u0067\u0020\u0028\u0025\u0073\u0029",pdfTime );
|
|
|
|
};if len (_gg [0])!=10{return _af .Time {},_a .New ("\u0069\u006e\u0076\u0061\u006c\u0069\u0064\u0020\u0072\u0065\u0067\u0065\u0078p\u0020\u0067\u0072\u006f\u0075\u0070 \u006d\u0061\u0074\u0063\u0068\u0020\u006c\u0065\u006e\u0067\u0074\u0068\u0020!\u003d\u0020\u0031\u0030");
|
|
|
|
};_b ,_ :=_f .ParseInt (_gg [0][1],10,32);_ee ,_ :=_f .ParseInt (_gg [0][2],10,32);_fc ,_ :=_f .ParseInt (_gg [0][3],10,32);_ae ,_ :=_f .ParseInt (_gg [0][4],10,32);_eef ,_ :=_f .ParseInt (_gg [0][5],10,32);_fcf ,_ :=_f .ParseInt (_gg [0][6],10,32);var (_ed byte ;
|
|
|
|
_ec int64 ;_bb int64 ;);if len (_gg [0][7])> 0{_ed =_gg [0][7][0];}else {_ed ='+';};if len (_gg [0][8])> 0{_ec ,_ =_f .ParseInt (_gg [0][8],10,32);}else {_ec =0;};if len (_gg [0][9])> 0{_bb ,_ =_f .ParseInt (_gg [0][9],10,32);}else {_bb =0;};_cc :=int (_ec *60*60+_bb *60);
|
|
|
|
switch _ed {case '-':_cc =-_cc ;case 'Z':_cc =0;};_fe :=_c .Sprintf ("\u0055\u0054\u0043\u0025\u0063\u0025\u002e\u0032\u0064\u0025\u002e\u0032\u0064",_ed ,_ec ,_bb );_cfd :=_af .FixedZone (_fe ,_cc );return _af .Date (int (_b ),_af .Month (_ee ),int (_fc ),int (_ae ),int (_eef ),int (_fcf ),0,_cfd ),nil ;
|
|
|
|
};
|