Permalink
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...
tsuna committed May 6, 2012
1 parent 5461b41 commit e2e1dc7e15f43f1c2ec20a0f5be736cb5ca1a8e6
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 {

0 comments on commit e2e1dc7

Please sign in to comment.