Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6562610A25 for ; Fri, 17 Apr 2015 09:51:05 +0000 (UTC) Received: (qmail 20968 invoked by uid 500); 17 Apr 2015 09:50:59 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 20924 invoked by uid 500); 17 Apr 2015 09:50:59 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 20911 invoked by uid 99); 17 Apr 2015 09:50:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Apr 2015 09:50:59 +0000 Date: Fri, 17 Apr 2015 09:50:58 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-6342) Undocumented feature to pass dates as Duration in JAX-RS-search MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14499561#comment-14499561 ] Sergey Beryozkin commented on CXF-6342: --------------------------------------- Thanks for the suggested text, I added a "Relative queries" subsection to "Using Dates with Queries", copied your text nearly 1 to 1, thanks > Undocumented feature to pass dates as Duration in JAX-RS-search > ---------------------------------------------------------------- > > Key: CXF-6342 > URL: https://issues.apache.org/jira/browse/CXF-6342 > Project: CXF > Issue Type: Improvement > Components: JAX-RS > Affects Versions: 3.0.4 > Reporter: Vjacheslav Borisov > Priority: Minor > Fix For: 3.0.5 > > > Occasionally found useful, but undocumented feature to pass dates as Duration in JAX-RS-search. I think it should be documented in > http://cxf.apache.org/docs/jax-rs-search.html > {code:title=AbstractSearchConditionParser.java|borderStyle=solid} > // is that duration? > try { > Date now = new Date(); > DatatypeFactory.newInstance().newDuration(value).addTo(now); > return now; > } catch (DatatypeConfigurationException e1) { > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)