summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2011-11-24 04:56:08 (EST)
committer mwu2011-11-24 04:56:08 (EST)
commitd786f20195b9e328ad10552add9c4720991d299d (patch)
treed677412fe1350775372ef210b71cafd8e0e8420f
parent7277aaffe45f1145af9a929d1eb1b0afeea37397 (diff)
downloadorg.eclipse.birt-d786f20195b9e328ad10552add9c4720991d299d.zip
org.eclipse.birt-d786f20195b9e328ad10552add9c4720991d299d.tar.gz
org.eclipse.birt-d786f20195b9e328ad10552add9c4720991d299d.tar.bz2
support current week in week to date function
-rw-r--r--data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/data/impl/aggregation/function/WeekToDateFunciton.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/data/impl/aggregation/function/WeekToDateFunciton.java b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/data/impl/aggregation/function/WeekToDateFunciton.java
index 09ad744..634bfe5 100644
--- a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/data/impl/aggregation/function/WeekToDateFunciton.java
+++ b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/data/impl/aggregation/function/WeekToDateFunciton.java
@@ -54,6 +54,18 @@ public class WeekToDateFunciton extends AbstractMDX implements IPeriodsFunction
timeMembers.add( timeMember );
}
+ if ( isCurrent )
+ {
+ for ( int i = weekday + 1; i <= 7; i++ )
+ {
+ newCal.setTimeInMillis( cal.getTimeInMillis( )
+ + ( i - weekday ) * dayTimeInMills );
+ tmp = getValueFromCal( newCal, levelTypes );
+ TimeMember timeMember = new TimeMember( tmp, levelTypes );
+ timeMembers.add( timeMember );
+ }
+ }
+
}
return timeMembers;