replace mysql with queryDB(), and added extend_date() function to support GSoC calendar