fully type sydatum and syuzeit (#3457)

This commit is contained in:
Lars Hvam 2020-06-07 09:01:08 +02:00 committed by GitHub
parent da9fcd673f
commit 9af61c99c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 7 deletions

View File

@ -68,10 +68,12 @@
"globalMacros": []
},
"rules": {
"downport": false,
"line_break_multiple_parameters": true,
"unknown_types": true,
"forbidden_void_type": {
"check": ["^stringtab$", "^SYCHAR01$", "^char2$", "^char20$", "^int4$", "^flag$", "^char12$", "^char10$", "^char70$", "^char4$"]
"check": ["^stringtab$", "^SYCHAR01$", "^char2$", "^char20$", "^int4$",
"^flag$", "^char12$", "^char10$", "^char70$", "^char4$", "^sydatum$", "^syuzeit$"]
},
"forbidden_identifier": true,
"try_without_catch": false,
@ -130,6 +132,7 @@
"check_syntax": true,
"class_attribute_names": {
"ignoreExceptions": true,
"ignoreInterfaces": false,
"statics": "^G._.*$",
"ignoreLocal": false,
"constants": "",

View File

@ -7,14 +7,14 @@ CLASS zcl_abapgit_time DEFINITION
TYPES: ty_unixtime TYPE c LENGTH 16.
CLASS-METHODS get_unix
IMPORTING iv_date TYPE sydatum DEFAULT sy-datum
iv_time TYPE syuzeit DEFAULT sy-uzeit
IMPORTING iv_date TYPE sy-datum DEFAULT sy-datum
iv_time TYPE sy-uzeit DEFAULT sy-uzeit
RETURNING VALUE(rv_time) TYPE ty_unixtime
RAISING zcx_abapgit_exception.
CLASS-METHODS get_utc
IMPORTING iv_unix TYPE ty_unixtime
EXPORTING ev_date TYPE sydatum
ev_time TYPE syuzeit.
EXPORTING ev_date TYPE sy-datum
ev_time TYPE sy-uzeit.
PROTECTED SECTION.
PRIVATE SECTION.
CONSTANTS: c_epoch TYPE d VALUE '19700101'.

View File

@ -29,8 +29,8 @@ CLASS ltcl_time_test IMPLEMENTATION.
METHOD get_utc.
DATA: lv_date TYPE sydatum,
lv_time TYPE syuzeit.
DATA: lv_date TYPE sy-datum,
lv_time TYPE sy-uzeit.
zcl_abapgit_time=>get_utc(
EXPORTING