 path = require 'path'
 cheerio = require 'cheerio'
 commander = require 'commander-b'
+moment = require 'moment'
 request = require './request'
 
 getVersion = ->

    data = null
    $('select option[selected=selected]').each ->
      e = $ @
      data =
        label: e.text()
        amount: $('.amount strong').text()
    data

delayedResolve = (value, delay) ->

      .then (result) ->
        console.log("fetch [#{i}]")
        fetchForPage jar, i
        .then ({ date, fixed, amount } = {}) ->
          result[date] = { date, fixed, amount } if date?
        .then ->
          delayedResolve result, 500
    , Promise.resolve {}
