admin
2025-01-16 fa6a937b65a8bcec38cd6acae85fd181290a8f32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Quintiq file version 2.0
#parent: #root
Function CalcDisplayDate
{
  TextBody:
  [*
    // Akari Oct-26-2024 (created)
    value := "";
    if( this.TimeUnit() = "Week" ){
      date := this.CustomDate().StartOfNextWeek() - 1 ;
      stringDate := date.Format( "Y/M2/D2");
      perSuffx := ifexpr( this.CustomDate().Week() < 10,"0"+[String]this.CustomDate().Week(),[String]this.CustomDate().Week() );
      value := "KW" + perSuffx + " - " + stringDate;
    }else if( this.TimeUnit() = "Month" ){
      us_locale := Locale::Construct( 'en_us' );
      
      date := this.CustomDate();
      stringDate := date.Format( "MM / M" + "月" ,us_locale )
      value := stringDate;
    }else{
      value := this.CustomDate().Format( "Y/M2/D2" );
    }
    
    this.DisplayDate( value );
  *]
}