<commit_before>describe("Format", function() {
    var oDate, f;
    
    beforeEach(function() {
        if( typeof Date.prototype.jsDateFormat == 'undefined' ) {
            fs = require('fs');
            // ToDo: figure out why relative paths did not work, relying on a specific location may not be safe
            myCode = fs.readFileSync('/home/travis/build/derokorian/jsDateFormat/jsDateFormat.js','utf-8');
            eval(myCode);
        }
        
        f = Date.prototype.jsDateFormat.getTZ;
        var tz = new Date().getTimezoneOffset() - 60;
        var strDate = '2012-04-04T19:05:07.117' + f(tz);
        oDate = new Date(strDate);
    });
    
    it('verifies format as a method of date', function() {
        expect(typeof oDate.format).toBe('function');
    })
    
    it('checks the year options', function(){
        expect(oDate.format('yy')).toEqual('2012');
        expect(oDate.format('y')).toEqual('12');
    });
    
    it('checks the month (numeric) options', function() {
        expect(oDate.format('mm')).toEqual('04');
        expect(oDate.format('m')).toEqual('4');
    });
    
    it('checks the month (text - english) options', function() {
        expect(oDate.format('MM')).toEqual('April');
        expect(oDate.format('M')).toEqual('Apr');
    });
    
    it('checks the day (numeric) options', function () {<commit_msg>TZ issues again..<commit_after>describe("Format", function() {
    var oDate, f;
    
    beforeEach(function() {
        if( typeof Date.prototype.jsDateFormat == 'undefined' ) {
            fs = require('fs');
            // ToDo: figure out why relative paths did not work, relying on a specific location may not be safe
            myCode = fs.readFileSync('/home/travis/build/derokorian/jsDateFormat/jsDateFormat.js','utf-8');
            eval(myCode);
        }
        
        f = Date.prototype.jsDateFormat.getTZ;
        var tz = new Date().getTimezoneOffset();
        var strDate = '2012-04-04T19:05:07.117' + f(tz);
        oDate = new Date(strDate);
    });
    
    it('verifies format as a method of date', function() {
        expect(typeof oDate.format).toBe('function');
    })
    
    it('checks the year options', function(){
        expect(oDate.format('yy')).toEqual('2012');
        expect(oDate.format('y')).toEqual('12');
    });
    
    it('checks the month (numeric) options', function() {
        expect(oDate.format('mm')).toEqual('04');
        expect(oDate.format('m')).toEqual('4');
    });
    
    it('checks the month (text - english) options', function() {
        expect(oDate.format('MM')).toEqual('April');
        expect(oDate.format('M')).toEqual('Apr');
    });
    
    it('checks the day (numeric) options', function () {
{'fraction_non_alphanumeric': 0.16757940854326397, 'fraction_numerical': 0.02044541803577948, 'mean_word_length': 2.5309278350515463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4085851', 'n_tokens_mistral': 860, 'n_tokens_neox': 830, 'n_words': 175}