I have been working on the appian api and trust me its very different from what i expected... the no of hassles faced are so much that for just shifting from 1 version to other i had to do a POC.. It was worth it.. :)
package com.trial;
import com.ibm.icu.text.DateFormatSymbols;
import com.ibm.icu.text.SimpleDateFormat;
import com.ibm.icu.util.Calendar;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
/**
*This program helps to find out the difference in calendar implementations of Appian 5.0 and Appian 6.0
*@author ajo.koshy
*@version 1.0
*The only requirements are 4 jar files :
*a) appian-asi
*b) appian-util
*c) appian-globalization
*d) icu4j-4.0.1
* */
public class TrialExec {
/**
* @throws None
* @author ajo.koshy
* */
public static void main(String args[]){
String ans="";
Calendar cal = Calendar.getInstance(Locale.UK);// Use Locale.US for different answer
SimpleDateFormat dtf = new SimpleDateFormat("MM/dd/yy", Locale.UK);// Use Locale.US for different answer
DateFormatSymbols symbols = dtf.getDateFormatSymbols();
String[] shortWeekdays = symbols.getShortWeekdays();
List<String> weekdayInitials = new ArrayList<String>();
int firstDayOfWeek = cal.getFirstDayOfWeek();
cal.set(2012, 0, 1);
int blankSpaces = cal.get(7) - firstDayOfWeek;
int newBlankSpaces = getLeadingBlankSpaces(cal);
for (int i = firstDayOfWeek; i < shortWeekdays.length; i++) {
/*if (shortWeekdays[i].length() > 0) {
}*/
weekdayInitials.add(Character.toString(shortWeekdays[i].charAt(0)));
}
for (int i = 0; i < firstDayOfWeek; i++) {
if (shortWeekdays[i].length() > 0) {
weekdayInitials.add(Character.toString(shortWeekdays[i].charAt(0)));
}
}
for(int i=0;i<weekdayInitials.size();i++)
{
ans=ans+" "+weekdayInitials.get(i);
}
System.out.println(ans);
System.out.println(cal.getTime());
System.out.println("blankspaces are = "+blankSpaces);
System.out.println("now blankspaces are = "+newBlankSpaces);
}
private static int getLeadingBlankSpaces(Calendar firstDayOfTargetMonthAndYear) {
/**
* @author ajo.koshy
* @param Calendar Object
* */
int firstDayOfWeek = firstDayOfTargetMonthAndYear.getFirstDayOfWeek();
int daysPerWeek = firstDayOfTargetMonthAndYear.getMaximum(7);
int dayOfWeek = firstDayOfTargetMonthAndYear.get(7);
return (daysPerWeek + (dayOfWeek - firstDayOfWeek)) % daysPerWeek;
}
/**
* @return nothing.. but prints values that differ with the locale
* */
}
package com.trial;
import com.ibm.icu.text.DateFormatSymbols;
import com.ibm.icu.text.SimpleDateFormat;
import com.ibm.icu.util.Calendar;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
/**
*This program helps to find out the difference in calendar implementations of Appian 5.0 and Appian 6.0
*@author ajo.koshy
*@version 1.0
*The only requirements are 4 jar files :
*a) appian-asi
*b) appian-util
*c) appian-globalization
*d) icu4j-4.0.1
* */
public class TrialExec {
/**
* @throws None
* @author ajo.koshy
* */
public static void main(String args[]){
String ans="";
Calendar cal = Calendar.getInstance(Locale.UK);// Use Locale.US for different answer
SimpleDateFormat dtf = new SimpleDateFormat("MM/dd/yy", Locale.UK);// Use Locale.US for different answer
DateFormatSymbols symbols = dtf.getDateFormatSymbols();
String[] shortWeekdays = symbols.getShortWeekdays();
List<String> weekdayInitials = new ArrayList<String>();
int firstDayOfWeek = cal.getFirstDayOfWeek();
cal.set(2012, 0, 1);
int blankSpaces = cal.get(7) - firstDayOfWeek;
int newBlankSpaces = getLeadingBlankSpaces(cal);
for (int i = firstDayOfWeek; i < shortWeekdays.length; i++) {
/*if (shortWeekdays[i].length() > 0) {
}*/
weekdayInitials.add(Character.toString(shortWeekdays[i].charAt(0)));
}
for (int i = 0; i < firstDayOfWeek; i++) {
if (shortWeekdays[i].length() > 0) {
weekdayInitials.add(Character.toString(shortWeekdays[i].charAt(0)));
}
}
for(int i=0;i<weekdayInitials.size();i++)
{
ans=ans+" "+weekdayInitials.get(i);
}
System.out.println(ans);
System.out.println(cal.getTime());
System.out.println("blankspaces are = "+blankSpaces);
System.out.println("now blankspaces are = "+newBlankSpaces);
}
private static int getLeadingBlankSpaces(Calendar firstDayOfTargetMonthAndYear) {
/**
* @author ajo.koshy
* @param Calendar Object
* */
int firstDayOfWeek = firstDayOfTargetMonthAndYear.getFirstDayOfWeek();
int daysPerWeek = firstDayOfTargetMonthAndYear.getMaximum(7);
int dayOfWeek = firstDayOfTargetMonthAndYear.get(7);
return (daysPerWeek + (dayOfWeek - firstDayOfWeek)) % daysPerWeek;
}
/**
* @return nothing.. but prints values that differ with the locale
* */
}
https://bayanlarsitesi.com/
ReplyDeleteAltınşehir
Karaköy
Alemdağ
Gürpınar
LFC
görüntülü show
ReplyDeleteücretlishow
VVX1BH
görüntülüshow
ReplyDeleteücretli show
UA5E
https://titandijital.com.tr/
ReplyDeletedenizli parça eşya taşıma
sinop parça eşya taşıma
artvin parça eşya taşıma
antep parça eşya taşıma
3HKHU
ankara parça eşya taşıma
ReplyDeletetakipçi satın al
antalya rent a car
antalya rent a car
ankara parça eşya taşıma
23Y
Çorlu Lojistik
ReplyDeleteManisa Lojistik
Eskişehir Lojistik
Afyon Lojistik
Konya Lojistik
G86
istanbul evden eve nakliyat
ReplyDeletekonya evden eve nakliyat
düzce evden eve nakliyat
bursa evden eve nakliyat
diyarbakır evden eve nakliyat
0F53KN
adana evden eve nakliyat
ReplyDeletebolu evden eve nakliyat
diyarbakır evden eve nakliyat
sinop evden eve nakliyat
kilis evden eve nakliyat
R6XİT
1CB49
ReplyDeleteBurdur Lojistik
Bursa Lojistik
Ardahan Lojistik
Osmaniye Lojistik
Kilis Parça Eşya Taşıma
4E624
ReplyDeleteBitget Güvenilir mi
Ünye Oto Lastik
Artvin Şehir İçi Nakliyat
Maraş Şehir İçi Nakliyat
Mardin Lojistik
Çanakkale Parça Eşya Taşıma
Erzurum Evden Eve Nakliyat
Casper Coin Hangi Borsada
Ünye Evden Eve Nakliyat
EE0D2
ReplyDeleteAydın Evden Eve Nakliyat
Samsun Evden Eve Nakliyat
Ünye Marangoz
Erzurum Şehir İçi Nakliyat
Giresun Şehir İçi Nakliyat
Bitget Güvenilir mi
Ağrı Evden Eve Nakliyat
Yobit Güvenilir mi
Altındağ Boya Ustası
EAE6A
ReplyDeletebinance %20 indirim
1677D
ReplyDeleteücretsiz sohbet uygulamaları
kadınlarla sohbet
canlı sohbet siteleri
ığdır canli goruntulu sohbet siteleri
van mobil sohbet chat
samsun sohbet uygulamaları
maraş rastgele sohbet odaları
görüntülü sohbet odaları
eskişehir telefonda kadınlarla sohbet
67AC3
ReplyDeletecanlı sohbet odası
aydın ücretsiz sohbet
antalya sohbet
Adana Sesli Sohbet Siteleri
balıkesir sesli sohbet sesli chat
rastgele sohbet uygulaması
ücretsiz görüntülü sohbet uygulamaları
sohbet sitesi
ısparta Görüntülü Sohbet Uygulamaları Ücretsiz
0D918E5348
ReplyDeletedüşmeyen takipçi satın al
2D5C9D6F7E
ReplyDeleteinstagram takipçi al
F825061CA3
ReplyDeleteEn Güvenilir VPN
Google İşletme Ekleme
Yabancı Takipçi Satın Al
Google Maps Yorum Satın Al
En Güvenilir Vpn Hangisi
Aşkı Memnu Kaç Yılında Yazıldı
İngilizce Öğrenme
türk takipçi satın al
Footer Link Satın Al