38 #include <ksystemtimezone.h>
47 class KCal::Event::Private
51 : mHasEndDate( false ),
52 mTransparency( Opaque )
54 Private(
const KCal::Event::Private &other )
55 : mDtEnd( other.mDtEnd ),
56 mHasEndDate( other.mHasEndDate ),
57 mTransparency( other.mTransparency )
62 Transparency mTransparency;
67 : d( new KCal::
Event::Private )
83 return new Event( *
this );
89 if ( &other ==
this ) {
102 dtEnd() ==
event.dtEnd() &&
158 return end.addSecs(-1).date();
164 if ( spec.isValid() ) {
167 if ( spec.timeZone() != KSystemTimeZones::local() ) {
168 timeZone =
' ' + spec.timeZone().name();
171 return KGlobal::locale()->formatTime(
172 dtEnd().toTimeSpec( spec ).time(), !shortfmt ) + timeZone;
174 return KGlobal::locale()->formatTime(
dtEnd().time(), !shortfmt );
180 if ( spec.isValid() ) {
183 if ( spec.timeZone() != KSystemTimeZones::local() ) {
184 timeZone =
' ' + spec.timeZone().name();
187 return KGlobal::locale()->formatDate(
188 dtEnd().toTimeSpec( spec ).date(),
189 ( shortfmt ? KLocale::ShortDate : KLocale::LongDate ) ) + timeZone;
191 return KGlobal::locale()->formatDate(
193 ( shortfmt ? KLocale::ShortDate : KLocale::LongDate ) );
203 if ( spec.isValid() ) {
206 if ( spec.timeZone() != KSystemTimeZones::local() ) {
207 timeZone =
' ' + spec.timeZone().name();
210 return KGlobal::locale()->formatDateTime(
211 dtEnd().toTimeSpec( spec ).dateTime(),
212 ( shortfmt ? KLocale::ShortDate : KLocale::LongDate ) ) + timeZone;
214 return KGlobal::locale()->formatDateTime(
216 ( shortfmt ? KLocale::ShortDate : KLocale::LongDate ) );
227 return d->mHasEndDate;
233 KDateTime start, end;
234 if ( spec.isValid() ) {
235 start =
dtStart().toTimeSpec( spec );
236 end =
dtEnd().toTimeSpec( spec );
243 end = end.addSecs( -1 );
246 bool multi = ( start.date() != end.date() && start <= end );
251 const KDateTime::Spec &newSpec )
255 d->mDtEnd = d->mDtEnd.toTimeSpec( oldSpec );
256 d->mDtEnd.setTimeSpec( newSpec );
271 return d->mTransparency;