function _format(date) {
    var day = date.getDate();
    var month = date.getMonth();
    var year = date.getFullYear();

    var values = [];
    values.push(day);
    values.push(month);
    values.push(year);

    return values.join(".");
}

Core.Prayers = {};
Core.Prayers.today = new Date();
Core.Prayers.formattedToday = _format(Core.Prayers.today);

Core.Prayers.load = function(object) {
    Core.Prayers.prayersTimesTable = object;
    Core.Prayers.todayPrayers = object[Core.Prayers.formattedToday];
};

Core.Prayers.getTodayFadjr = function() {
    return Core.Prayers.todayPrayers["1"];
};

Core.Prayers.getTodayShuruk = function() {
    return Core.Prayers.todayPrayers["2"];
};

Core.Prayers.getTodayThuhr = function() {
    return Core.Prayers.todayPrayers["3"];
};

Core.Prayers.getTodayAsr = function() {
    return Core.Prayers.todayPrayers["4"];
};

Core.Prayers.getTodayMagrib = function() {
    return Core.Prayers.todayPrayers["5"];
};

Core.Prayers.getTodayIsha = function() {
    return Core.Prayers.todayPrayers["6"];
};


