Question: Below is code

```
given().
        get("http://services.groupkt.com/country/get/all").        
then().
      body("RestResponse.result.name", hasItems("Austria","Algeria")).log().all();

```

hasItems() is not recognized by IDE, showing as can't resolve method hasItems()

Maven dependecies exist: Rest assured, groovy, hamcrest.

please help me.

Answer: 
if you want to work with date, you can use momentjs module:
<https://momentjs.com>

```
moment().format('MMMM Do YYYY, h:mm:ss a'); // July 13th 2017, 11:18:05 pm
moment().format('dddd');                    // Thursday
moment().format("MMM Do YY");               // Jul 13th 17
moment().format('YYYY [escaped] YYYY');     // 2017 escaped 2017
moment().format();                          // 2017-07-13T23:18:05+04:30

```

and about the error you got,you most use like this:

```
 let monthStr: string = month;
 if ( month < 10) {
     monthStr = '0' + month;
 }

```
First of all, I'm not sure why you are defining `month` as a `const` and then trying to change it. Declare all your variables with `let` and convert them all to strings and you should be good to go.

```
function date() {
    let str = '';

    const currentTime = new Date();
    let year = currentTime.getFullYear().toString();
    let month = currentTime.getMonth().toString();
    let day = currentTime.getDate().toString();

    let hours = currentTime.getHours().toString();
    let minutes = currentTime.getMinutes().toString();
    let seconds = currentTime.getSeconds().toString();
    if (month < 10) {
        month = '0' + month;
    }
    if (minutes < 10) {
        minutes = '0' + minutes;
    }
    if (seconds < 10) {
        seconds = '0' + seconds;
    }
    str += year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds + ' ';

    console.log(str);
}

```

See it working here: <https://jsfiddle.net/40jbg8qt/>