Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow "1d-ago" style input in date boxes.

We already allowed "1d ago", but the URLs use a dash instead, so allow
that too.

Change-Id: I45cd09c018289cfd6c60b979bec7bf1ff3ec3b12
  • Loading branch information...
commit e2e1dc7e15f43f1c2ec20a0f5be736cb5ca1a8e6 1 parent 5461b41
@tsuna tsuna authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/tsd/client/DateTimeBox.java
View
2  src/tsd/client/DateTimeBox.java
@@ -53,7 +53,7 @@
public Date parse(final DateBox box,
final String text,
final boolean report_error) {
- if (text.endsWith(" ago")) { // "1d ago" and such
+ if (text.endsWith(" ago") || text.endsWith("-ago")) { // e.g. "1d ago".
int interval;
final int lastchar = text.length() - 5;
try {
Please sign in to comment.
Something went wrong with that request. Please try again.