diff --git a/tsg_util/preferencesForm.m b/tsg_util/preferencesForm.m index 2ad7c94054fd874f35fead51b816c17e49a71ce4..c5bf21bfb6db85a204d48c2b2a44840eb285f8b7 100644 --- a/tsg_util/preferencesForm.m +++ b/tsg_util/preferencesForm.m @@ -492,6 +492,79 @@ if bottom < .1 left = left + inc_x; end +% display format for dates TITLE +% ------------------------------- +uicontrol(... + 'Parent', hPreferencesFig, ... + 'Units', 'normalized', ... + 'Style', 'Text', 'Fontsize', tsg.fontSize, 'FontWeight', 'bold',... + 'HorizontalAlignment', 'Left', ... + 'Position',[left, bottom, 2*length, height], ... + 'String', 'Formats used for date'); + +bottom = bottom - inc_y - height; +if bottom < .1 + bottom = 0.95; + left = left + inc_x; +end + +% display date format for variable text +% ------------------------------------- +uicontrol(... + 'Parent', hPreferencesFig, ... + 'Units', 'normalized', ... + 'Style', 'Text','Fontsize', tsg.fontSize-1,'HorizontalAlignment', 'left', ... + 'Position',[left, bottom, length, height], ... + 'TooltipString', 'Format is not available for change', ... + 'String', 'Date format for variable:'); + +% display date format for variable uicontrol +% ------------------------------------------ +uicontrol(... + 'Parent', hPreferencesFig, ... + 'Units', 'normalized', 'Style', 'Edit', 'BackgroundColor', 'w', ... + 'Fontsize', tsg.fontSize-2, 'HorizontalAlignment', 'right', ... + 'Position', [left + length, bottom, length, height], ... + 'Enable', 'inactive',... + 'TooltipString', 'Format is not available for change', ... + 'String', tsg.preference.date_format_variable, ... + 'Tag', 'PREFERENCE_DATE_FORMAT_VARIABLE'); + +bottom = bottom - inc_y - height; +if bottom < .1 + bottom = 0.95; + left = left + inc_x; +end + +% display date format for attribute min text +% ------------------------------------------ +uicontrol(... + 'Parent', hPreferencesFig, ... + 'Units', 'normalized', ... + 'Style', 'Text', 'Fontsize', tsg.fontSize-1, 'HorizontalAlignment', 'left', ... + 'Position',[left, bottom, length, height], ... + 'TooltipString', 'Format is not available for change', ... + 'String', 'Date format for attibute'); + +% display date format for attribute uicontrol +% ------------------------------------------- +uicontrol(... + 'Parent', hPreferencesFig, ... + 'Units', 'normalized', 'Style', 'Edit', ... + 'Fontsize', tsg.fontSize-2, 'BackgroundColor', 'w', ... + 'HorizontalAlignment', 'right', ... + 'Position', [left + length, bottom, length, height], ... + 'Enable', 'inactive',... + 'TooltipString', 'Format is not available for change', ... + 'String', tsg.preference.date_format_attribute, ... + 'Tag', 'PREFERENCES_DATE_FORMAT_ATTRIBUTE'); + +bottom = bottom - inc_y - height; +if bottom < .1 + bottom = 0.95; + left = left + inc_x; +end + % CONTINUE PUSH BUTTON % -------------------- % The Continue (valid) button diff --git a/tsg_util/tsg_preferences.m b/tsg_util/tsg_preferences.m index dda0bacdca4b03c866f7742432b65a7fce3d7e48..b7b2dbe921ba7fa626202669ef0aa5c6d4d66e9c 100644 --- a/tsg_util/tsg_preferences.m +++ b/tsg_util/tsg_preferences.m @@ -153,6 +153,8 @@ set(hTsgGUI,'Pointer','arrow'); preference.ssjt_max_string = {'40'}; preference.sstp_min_string = {'-3'}; preference.sstp_max_string = {'40'}; + preference.date_format_variable = {'yyyyMMddHHmmss'}; + preference.date_format_attribute = {'yyyy-MM-ddTHH:mm:ssZ'}; % save preference struct to 'prefdir.mat' file % ---------------------------------------------