Skip to content

Commit f1ec105

Browse files
committed
Edit pom.xml for project
1 parent 24f75fe commit f1ec105

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.upokecenter</groupId>
55
<artifactId>cbor</artifactId>
66
<packaging>jar</packaging>
7-
<version>4.4.2</version>
7+
<version>4.4.1-SNAPSHOT</version>
88
<name>CBOR (Concise Binary Object Representation)</name>
99
<description>A Java implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 8949.</description>
1010
<url>https://github.com/peteroupc/CBOR-Java</url>
@@ -133,7 +133,7 @@
133133
<dependency>
134134
<groupId>com.github.peteroupc</groupId>
135135
<artifactId>numbers</artifactId>
136-
<version>1.7.4</version>
136+
<version>1.8.0</version>
137137
</dependency>
138138
</dependencies>
139139
</project>

src/main/java/com/upokecenter/cbor/CBORDateConverter.java

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,6 @@ public boolean TryGetDateTimeFields(CBORObject obj, EInteger[] year, int[]
202202
// TODO: In next major version, return false instead of throwing an
203203
// exception if the arguments are invalid, to conform to convention
204204
// with Try* methods in DotNet.
205-
// TODO: In next minor version, add overload that takes an out parameter
206-
// for year to DotNet version.
207205
if (year == null) {
208206
throw new NullPointerException("year");
209207
}
@@ -373,7 +371,24 @@ public CBORObject DateTimeFieldsToCBORObject(
373371
/**
374372
* Converts a date/time in the form of a year, month, day, hour, minute,
375373
* second, fractional seconds, and time offset to a CBOR object.
376-
* @param bigYear The parameter {@code bigYear} is a Numbers.EInteger object.
374+
* @param year Not documented yet.
375+
* @param lesserFields Not documented yet.
376+
* @return A CBOR object encoding the given date fields according to the
377+
* conversion type used to create this date converter.
378+
* @throws NullPointerException The parameter {@code bigYear} or {@code
379+
* lesserFields} is null.
380+
* @throws com.upokecenter.cbor.CBORException An error occurred in conversion.
381+
*/
382+
public CBORObject DateTimeFieldsToCBORObject(int year, int[]
383+
lesserFields) {
384+
return this.DateTimeFieldsToCBORObject(EInteger.FromInt32(year),
385+
lesserFields);
386+
}
387+
388+
/**
389+
* Converts a date/time in the form of a year, month, day, hour, minute,
390+
* second, fractional seconds, and time offset to a CBOR object.
391+
* @param bigYear The year.
377392
* @param lesserFields An array that will store the fields (other than the
378393
* year) of the date and time. See the TryGetDateTimeFields method for
379394
* information on the "lesserFields" parameter.
@@ -385,8 +400,6 @@ public CBORObject DateTimeFieldsToCBORObject(
385400
*/
386401
public CBORObject DateTimeFieldsToCBORObject(EInteger bigYear, int[]
387402
lesserFields) {
388-
// TODO: In next minor version, add overload that takes int rather than
389-
// EInteger
390403
if (bigYear == null) {
391404
throw new NullPointerException("bigYear");
392405
}

0 commit comments

Comments
 (0)