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

[TIMOB-17554] TiAPI: Support "full" date format #6880

Merged
merged 3 commits into from
Jun 1, 2015
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ public String stringFormatDate(Date date, @Kroll.argument(optional=true) String

} else if (format.equals("long")) {
style = DateFormat.LONG;
} else if (format.equals("full")) {
style = DateFormat.FULL;
}
}

Expand Down
2 changes: 1 addition & 1 deletion apidoc/Global/String/String.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ methods:
type: Date

- name: format
summary: Date format to use. One of 'short', 'medium', or 'long'.
summary: Date format to use. One of 'short', 'medium', 'long' or 'full'.
type: String
optional: true
default: 'short'
Expand Down
4 changes: 4 additions & 0 deletions iphone/Classes/KrollContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ static TiValueRef StringFormatDateCallback (TiContextRef jsContext, TiObjectRef
{
style = NSDateFormatterLongStyle;
}
else if ([s isEqualToString:@"full"])
{
style = NSDateFormatterFullStyle;
}
}

@try
Expand Down