use the calculate
function in the minilang services with Date objects. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To permit to use the calculate function in the minilang services with Date objects. ------------------------------------------------------------------------------------ Key: OFBIZ-1249 URL: https://issues.apache.org/jira/browse/OFBIZ-1249 Project: OFBiz Issue Type: New Feature Affects Versions: Release Branch 4.0 Environment: all Reporter: Fabien Carrion Priority: Minor This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-1249: ------------------------------- Affects Version/s: (was: Release Branch 4.0) SVN trunk Summary: To permit to (was: To permit to use the calculate function in the minilang services with Date objects.) Changed version to Trunk since this is an improvement, not a bug fix. > To permit to > ------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Priority: Minor > Attachments: calculate_date_diff.patch.gz > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528210 ] Adrian Crum commented on OFBIZ-1249: ------------------------------------ What is being calculated in this patch? > To permit to > ------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Priority: Minor > Attachments: calculate_date_diff.patch.gz > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528217 ] Fabien Carrion commented on OFBIZ-1249: --------------------------------------- The calculate method in the minilang plugin only lets somebody do calculation on TYPE_DOUBLE, TYPE_FLOAT, TYPE_LONG, TYPE_INTEGER, TYPE_STRING, TYPE_BIG_DECIMAL I add the way to calculate on a DATE object. I just convert the date to a long which is the quantity of seconds since 1979 and then it is possible to do any kind of calculation we want. It is useful if we use it with the now-date-to-env function. > To permit to > ------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Priority: Minor > Attachments: calculate_date_diff.patch.gz > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-1249: ----------------------------------- Summary: To permit to to calculate on a DATE object in minilang (was: To permit to) > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Priority: Minor > Attachments: calculate_date_diff.patch.gz > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532899 ] Jacques Le Roux commented on OFBIZ-1249: ---------------------------------------- Fabien, Please could you refer to http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices to build your patches ? Thanks > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Priority: Minor > Attachments: calculate_date_diff.patch.gz > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabien Carrion updated OFBIZ-1249: ---------------------------------- Attachment: (was: calculate_date_diff.patch.gz) > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Priority: Minor > Attachments: calculate_date_diff.patch.gz > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabien Carrion updated OFBIZ-1249: ---------------------------------- Attachment: calculate_date_diff.patch.gz Changing to coding style convention > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Priority: Minor > Attachments: calculate_date_diff.patch.gz > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537792 ] Jacques Le Roux commented on OFBIZ-1249: ---------------------------------------- Fabien, I'm sorry but you are still using aboslute pathes in your patches (at least this one). And which option of SVN (Subversion) are you using to produce a such patch ? I mean having diff -Naur lasala.old/release4.0/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java lasala.new/release4.0/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java --- lasala.old/release4.0/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java 2007-09-17 11:47:38.000000000 -0500 +++ lasala.new/release4.0/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java 2007-09-17 11:45:56.000000000 -0500 in place of something like Index: applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java =================================================================== --- applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java (revision 586768) +++ applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java (working copy) Are you not using CVS to build your patches ? Thanks for your work > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Priority: Minor > Attachments: calculate_date_diff.patch.gz > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabien Carrion updated OFBIZ-1249: ---------------------------------- Attachment: (was: calculate_date_diff.patch.gz) > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Priority: Minor > Attachments: calculate_date_diff.patch > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabien Carrion updated OFBIZ-1249: ---------------------------------- Attachment: calculate_date_diff.patch Done with trunk version > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Priority: Minor > Attachments: calculate_date_diff.patch > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux reassigned OFBIZ-1249: -------------------------------------- Assignee: Jacques Le Roux > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Attachments: calculate_date_diff.patch > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538926 ] David E. Jones commented on OFBIZ-1249: --------------------------------------- Jacques: don't be too quick on this one please; we should do a design and requirements brainstorming discussion on the dev list before putting this in. The main thing I'm wondering is if there are other similar requirements that could be satisfied by small changes in the design of this. > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Attachments: calculate_date_diff.patch > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538941 ] Jacques Le Roux commented on OFBIZ-1249: ---------------------------------------- Hi David, No worries. > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Attachments: calculate_date_diff.patch > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549985 ] Jacques Le Roux commented on OFBIZ-1249: ---------------------------------------- Hi Fabien, I have asked the dev ML if it was ok to commit this patch as is, here are some comments so far : Chris Howe This really needs to go through a Calendar object instead of being cast to a long. Also, I don't think the current element structure is best suited for the operations that would be most beneficial for date/time calculations Adrian Crum Date calculation would be a great addition to mini language. Maybe we should discuss how it would look in mini lang code, then an implementation could be submitted. I propose you to join the discussion on ML or maybe to propose another implemtation (though for the later I wonder if at this stage we have suffciently discussed David suggestion about "other similar requirements") Thanks > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Attachments: calculate_date_diff.patch > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marco Risaliti updated OFBIZ-1249: ---------------------------------- Component/s: framework Fix Version/s: SVN trunk > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Components: framework > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: calculate_date_diff.patch > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552457 ] Jacopo Cappellato commented on OFBIZ-1249: ------------------------------------------ This is a summary from the dev mailing list for a new Minilang operation: <set-calendar field="toDate" from-field="fromDate" years="+1" months="+1" ... millis="+1" locale="parameters.locale" time-zone="parameters.timeZone"/> For example: <set-calendar field="tomorrowDate" from-field="nowTimestamp" days="1"/> > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Components: framework > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: calculate_date_diff.patch > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552518 ] Adrian Crum commented on OFBIZ-1249: ------------------------------------ I'm thinking we could add one more attribute to this: align-start="day | week | month | year" to align the new date/time to the specified period. > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Components: framework > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: calculate_date_diff.patch > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552542 ] Jacques Le Roux commented on OFBIZ-1249: ---------------------------------------- If I have weel understood, Adrian proposed in dev ML that the attribute "field=" could be optionnal, and also adjusters attributes (years="${year}"... millis="${millis}") . But there must be at least one of them (including "field=" in them, this is not clear to me ?) I don't think a such a rule (optionnal but one fields rule) is already used in minilang. > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Components: framework > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: calculate_date_diff.patch > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552548 ] Adrian Crum commented on OFBIZ-1249: ------------------------------------ I said that there must be at least one adjuster, otherwise the set-calendar operation doesn't make any sense. The remark about "field=" being optional can be ignored. That was more clearly defined as others added their suggestions. "field=" will work just like the existing set operation. > To permit to to calculate on a DATE object in minilang > ------------------------------------------------------ > > Key: OFBIZ-1249 > URL: https://issues.apache.org/jira/browse/OFBIZ-1249 > Project: OFBiz > Issue Type: New Feature > Components: framework > Affects Versions: SVN trunk > Environment: all > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: calculate_date_diff.patch > > > This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |