Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAS date formats implementation #86

Merged
merged 7 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.epam.parso.date;

/**
* Declared but not yet implemented formats throw this type of exception.
* This exception is suppose to be caught internally to substitute
* not implemented with on of fallback date format.
*/
class NotImplementedException extends RuntimeException {
}
14 changes: 14 additions & 0 deletions src/main/java/com/epam/parso/date/OutputDateType.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ public enum OutputDateType {
* can't be represented as a LocalTime!
*/
JAVA_TEMPORAL,
/**
* Output date as String formatted according to
* column format defined in the source SAS file.
* <p>
* Not all formats are yet supported and there is a slight difference
* between SAS and Parso results (at least in rounding),
* so this option is marked as experimental.
*/
SAS_FORMAT_EXPERIMENTAL,
/**
* Same as SAS_FORMAT, but result doesn't have leading spaces
* (trimmed, as the SAS Universal Viewer outputs by default).
*/
SAS_FORMAT_TRIM_EXPERIMENTAL,
/**
* Output date as raw SAS value.
* It is number of days (for date type) or seconds(for datetime type)
Expand Down
Loading