2014-08-22 08:55:42 +03:00
function Schedule ( ) {
var events = [ ] ;
this . addEvent = function ( event ) {
events . push ( event ) ;
events = _ . sortBy ( events , function ( event ) {
return event . startTime . unix ( )
} ) ;
}
this . upcomingEvents = function ( ) {
return _ . select ( events , function ( event ) {
return event . startTime . isAfter ( moment ( ) ) ;
} ) ;
}
this . nextEvent = function ( ) {
return _ . first ( this . upcomingEvents ( ) ) ;
}
this . currentEvent = function ( ) {
var latestEvent = _ . last ( this . pastEvents ( ) ) ;
var nextEvent = this . nextEvent ( ) ;
if ( typeof nextEvent != 'undefined' && moment ( nextEvent . startTime ) . subtract ( 'minutes' , 10 ) . isAfter ( moment ( ) ) ) {
return latestEvent ;
} else {
return undefined ;
}
}
this . futureEvents = function ( ) {
return this . upcomingEvents ( ) . splice ( 1 ) ;
}
this . pastEvents = function ( ) {
return _ . select ( events , function ( event ) {
return event . startTime . isBefore ( moment ( ) ) ;
} ) ;
}
this . allEvents = function ( ) {
return events ;
}
this . addDelay = function ( time ) {
_ . each ( this . upcomingEvents ( ) , function ( event , index , agenda ) {
event . startTime . add ( time ) ;
} ) ;
}
}
var schedule = new Schedule ( ) ;
schedule . addEvent ( {
2014-08-23 12:09:34 +03:00
title : 'Using Perl for autogeneration physical formulas' ,
startTime : moment ( { hour : 10 , minute : 00 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:09:34 +03:00
name : 'Ignat Ignatov' ,
2014-08-22 08:55:42 +03:00
description : ''
}
]
} ) ;
schedule . addEvent ( {
2014-08-23 12:09:34 +03:00
title : 'SQL::Abstract::FromQuery' ,
startTime : moment ( { hour : 10 , minute : 30 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:09:34 +03:00
name : 'Laurent Dami ( dami )' ,
description : ''
2014-08-22 08:55:42 +03:00
}
]
} ) ;
schedule . addEvent ( {
2014-08-23 12:09:34 +03:00
title : ' Extreme (Elastic)Search ' ,
startTime : moment ( { hour : 11 , minute : 00 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:09:34 +03:00
name : 'Borislav Nikolov ( jackdoe )' ,
description : ''
2014-08-22 08:55:42 +03:00
}
]
} ) ;
schedule . addEvent ( {
2014-08-23 12:09:34 +03:00
title : 'SQL for accountants: understanding the beast via SpreadSheets ' ,
startTime : moment ( { hour : 11 , minute : 30 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:09:34 +03:00
name : 'Peter Rabbitson ( ribasushi )' ,
2014-08-22 08:55:42 +03:00
description : ''
}
]
} ) ;
schedule . addEvent ( {
2014-08-23 12:09:34 +03:00
title : 'Lunch 🍔' ,
startTime : moment ( { hour : 12 , minute : 20 } )
} ) ;
schedule . addEvent ( {
title : 'Recruitment in Perl - The State of the Perl Recruitment Market ' ,
startTime : moment ( { hour : 13 , minute : 20 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:09:34 +03:00
name : 'Rick Deller' ,
description : ''
2014-08-22 08:55:42 +03:00
}
]
} ) ;
schedule . addEvent ( {
2014-08-23 12:09:34 +03:00
title : 'Creative Perlmongership ' ,
startTime : moment ( { hour : 13 , minute : 50 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:09:34 +03:00
name : 'Salve J. Nilsen ( sjn )' ,
2014-08-23 12:21:17 +03:00
description : 'One of the original Oslo.pm\'ers who seems to end up organizing stuff more often than hacking.'
2014-08-22 08:55:42 +03:00
}
]
} ) ;
schedule . addEvent ( {
2014-08-23 12:09:34 +03:00
title : 'CSV made easier for end-users ' ,
startTime : moment ( { hour : 14 , minute : 50 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:09:34 +03:00
name : 'H.Merijn Brand ( Tux )' ,
description : 'Using mainly open source utilities and C to exchange data between sources, porting open source to commercial OSes and support the Open Source community as widely as possible. perl5 Configure pumpking and CSV wizard.'
2014-08-22 08:55:42 +03:00
}
]
} ) ;
schedule . addEvent ( {
title : 'Coffee Break ☕' ,
startTime : moment ( { hour : 15 , minute : 40 } )
} ) ;