Skip to content

Commit

Permalink
Add date handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Burak Serdar committed May 27, 2015
1 parent 9c5dd5f commit db38435
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package com.redhat.lightblue.client.expression.update;

import java.util.Date;

import com.redhat.lightblue.client.util.ClientConstants;

public class Literal implements RValue {
private final Object value;

Expand Down Expand Up @@ -33,6 +37,8 @@ public String toJson() {
return null;
else if(value instanceof String)
return "\""+value+"\"";
else if(value instanceof Date)
return "\""+ClientConstants.getDateFormat().format((Date)value)+"\"";
else
return value.toString();
}
Expand Down

0 comments on commit db38435

Please sign in to comment.