// get date from server and call f(serv_date)
function call_for_server_date(f)
{
    get_js_date_url = '/teacher/get_js_date'  // TODO: remove hardcode

    r = Ajax.load_json(get_js_date_url, {})
    r.addCallback(function(doc) {
        serv_date = new Date(doc.year,
                             doc.month - 1,  // js strange
                             doc.day,
                             doc.hour,
                             doc.minute,
                             doc.second)
        f(serv_date)
    })
}

