packages/hexo-cli-extras/lib/edit.js
// filter the posts using an after date if supplied
filter the posts using an after date if supplied
filter the posts using an after date if supplied
function filterAfter(posts, after) {
        var momentAfter = moment(after.replace(/\//g, '-'), 'MM-DD-YYYY', true);
        if (!momentAfter.isValid()) {
          console.log(chalk.red('After date is not valid (expecting `MM-DD-YYYY`), ignoring argument.'));
          return posts;
        }
        return posts.filter(function filterPosts(post) {
          return moment(post.date).isAfter(momentAfter);
        });
      }
function filterAfter ( posts , after ) { var momentAfter = moment ( after . replace ( / \/ / g , '-' ) , 'MM-DD-YYYY' , true ) ; if ( ! momentAfter . isValid ( ) ) { console . log ( chalk . red ( 'After date is not valid (expecting `MM-DD-YYYY`), ignoring argument.' ) ) ; return posts ; } return posts . filter ( function filterPosts ( post ) { return moment ( post . date ) . isAfter ( momentAfter ) ; } ) ; }
filter the posts using an after date if supplied
filter the posts using an after date if supplied