Skip to content

Commit c3f7610

Browse files
committed
Rename TimeType components
1 parent 3e4a14c commit c3f7610

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Modelica/Utilities/Time.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package Time "Functions to work with date and time"
66
extends Modelica.Icons.Function;
77
output Types.TimeType now "Current time";
88
algorithm
9-
(now.ms, now.sec, now.min, now.hour, now.day, now.mon, now.year) := Internal.Time.getTime();
9+
(now.millisecond, now.second, now.minute, now.hour, now.day, now.month, now.year) := Internal.Time.getTime();
1010
annotation (Documentation(info="<html>
1111
<h4>Syntax</h4>
1212
<blockquote><pre>

Modelica/Utilities/Types.mo

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ package Types "Type definitions used in package Modelica.Utilities"
3838

3939
record TimeType "Record containing date and time components"
4040
extends Modelica.Icons.Record;
41-
Integer ms(min=0, max=999) "Millisecond" annotation(absoluteValue=true);
42-
Integer sec(min=0, max=61) "Second" annotation(absoluteValue=true);
43-
Integer min(min=0, max=59) "Minute" annotation(absoluteValue=true);
41+
Integer millisecond(min=0, max=999) "Millisecond" annotation(absoluteValue=true);
42+
Integer second(min=0, max=61) "Second" annotation(absoluteValue=true);
43+
Integer minute(min=0, max=59) "Minute" annotation(absoluteValue=true);
4444
Integer hour(min=0, max=23) "Hour" annotation(absoluteValue=true);
4545
Integer day(min=1, max=31) "Day" annotation(absoluteValue=true);
46-
Integer mon(min=1, max=12) "Month" annotation(absoluteValue=true);
46+
Integer month(min=1, max=12) "Month" annotation(absoluteValue=true);
4747
Integer year "Year" annotation(absoluteValue=true);
4848
annotation (Documentation(info="<html>
4949
<blockquote>

ModelicaTest/Utilities.mo

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,12 @@ extends Modelica.Icons.ExamplesPackage;
393393
Streams.print("... Test of Modelica.Utilities.Time", logFile);
394394

395395
now := Modelica.Utilities.Time.getTime();
396-
Streams.print(" ms = " + String(now.ms));
397-
Streams.print(" sec = " + String(now.sec));
398-
Streams.print(" min = " + String(now.min));
396+
Streams.print(" ms = " + String(now.millisecond));
397+
Streams.print(" sec = " + String(now.second));
398+
Streams.print(" min = " + String(now.minute));
399399
Streams.print(" hour = " + String(now.hour));
400400
Streams.print(" day = " + String(now.day));
401-
Streams.print(" mon = " + String(now.mon));
401+
Streams.print(" mon = " + String(now.month));
402402
Streams.print(" year = " + String(now.year));
403403

404404
assert(not Modelica.Utilities.Time.isLeapYear(1900), "Time.isLeapYear failed");

0 commit comments

Comments
 (0)