/**
 * 将日期转化成yyyy-MM-dd
 * @param time 
 */
var formatYearMonDay = function (time) {
  var date = getDate(time);
  var year = date.getFullYear()
  var month = date.getMonth() + 1
  var day = date.getDate()  
  return [year, month, day].map(formatNumber).join('-')
}
/**
 * 将日期转化成yyyy-MM
 * @param time 
 */
var formatYearMon = function (time) {
  var date = getDate(time);
  var year = date.getFullYear()
  var month = date.getMonth() + 1 
  return [year, month].map(formatNumber).join('-')
}
/**
 * 格式转换
 * @param n 
 */
var formatNumber = function (n) {
  n = n.toString()
  return n[1] ? n : '0' + n
} 

/**
 * //暴露接口调用
 */
module.exports = {
  // format: format
}